先问一句:rails.vim 是不是不能用 vundler 管理?
前提:我已经安装了 rails.vim
但是,当我用 vim 打开一个 rails 工程中的文件时,都会提示说
Disabling rails.vim: autoload/rails.vim is missing
并且 Rfind
Rcd
等命令都不能使用。
另外,每次我打开/etc/vimrc
文件时,都会有一些错误提示
Error detected while processing /etc/vimrc:
line 15:
E117: Unknown function: vundle#rc
line 18:
E492: Not an editor command: Bundle 'gmarik/vundle'
line 21:
E492: Not an editor command: Bundle "SuperTab"
line 22:
E492: Not an editor command: Bundle "taglist.vim"
line 24:
E492: Not an editor command: Bundle "ctrlp.vim"
line 25:
E492: Not an editor command: Bundle "rails.vim"
line 26:
E492: Not an editor command: Bundle "snipMate"
line 27:
E492: Not an editor command: Bundle "darkBlue"
line 29:
E492: Not an editor command: Bundle "http://github.com/scrooloose/nerdtree.git"
这些正好是 vundler 的配置命令,大家是怎么避免这种错误的?
附 /etc/vimrc
配置文件
f v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set nu " set line number
color darkblue " set colorscheme
au GUIEnter * simalt ~x " set full window
set modeline " set modeline on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" required!
Bundle 'gmarik/vundle'
" my bundles
Bundle "SuperTab"
Bundle "taglist.vim"
nnoremap <F8> :TlistToggle<CR>
Bundle "ctrlp.vim"
Bundle "rails.vim"
Bundle "snipMate"
Bundle "darkBlue"
Bundle "http://github.com/scrooloose/nerdtree.git"
nnoremap <F7> :NERDTreeToggle<CR>
nnoremap <F3> :NERDTree<CR>
let NERDTreeQuitOnOpen=0
filetype plugin indent on " required!