与Pathogen一起安装的vim-textobj-rubyblock不选择块

时间:2014-08-17 18:26:54

标签: ruby vim

我已完成以下操作以安装vim-textobj-user

git clone https://github.com/kana/vim-textobj-user.git

中的

~/.vim/bundle/

现在,在我的vimrc中,我添加了这一行:

runtime macros/matchit.vim

然后我将vim-textobj-rubyblock克隆到我的~/.vim/bundle/

现在,当我在Ruby块中时,如果按var,我会期望所有块都被选中,但是nopes。

我错过了什么?

这是我的vimrc:

set nocompatible
set backspace=indent,eol,start

call pathogen#infect()
call pathogen#helptags()

set encoding=utf-8
set termencoding=utf-8

set nobackup
set nowritebackup
set noswapfile
set autowriteall

set autoindent
set smarttab
set expandtab

runtime macros/matchit.vim " Required by https://github.com/nelstrom/vim-textobj-rubyblock

syntax on             
filetype on           
filetype plugin indent on
autocmd Filetype html setlocal ts=2 sts=2 sw=2
autocmd Filetype eruby setlocal ts=2 sts=2 sw=2
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
autocmd Filetype css setlocal ts=2 sts=2 sw=2
autocmd Filetype scss setlocal ts=2 sts=2 sw=2
autocmd Filetype php setlocal ts=4 sts=4 sw=4
autocmd Filetype coffee setlocal ts=2 sts=2 sw=2
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2
autocmd Filetype json setlocal ts=2 sts=2 sw=2
autocmd Filetype liquid setlocal ts=2 sts=2 sw=2

set smartindent               
set autoindent
set nocindent
set wrap

set magic
set ignorecase
set smartcase
set incsearch
set hlsearch

set lazyredraw
set ruler
set laststatus=2
set cmdheight=1
set number
set numberwidth=1
set cursorline

if has('gui_running')
        set background=light
else
        set background=dark
end
let g:solarized_termtrans = 1
colorscheme solarized

let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme = 'solarized'
set timeoutlen=50
set noshowmode

let mapleader = ","
nmap <leader>ne :NERDTree<cr>
let g:NERDTreeWinPos = "right" " Make nerdtree open on right

if has('gui_macvim')
  set lines=999 columns=9999
endif

set gfn=Monaco:h12

noremap <silent> <Space> :silent noh<Bar>echo<CR>

0 个答案:

没有答案