I installed Vundle and it does work. I can open a blank or existing file in vim and use Bundle commands just fine. However, when I use vim to edit my vimrc file in /etc/vim, I get the following error:
Error detected while processing /usr/share/vim/vimrc:
line 50:
E117: Unknown function: vundle#rc
line 59:
E492: Not an editor command: :Bundle 'gmarik/vundle'
Here is the contents of my vimrc file, I copied the lines used in vundle installation and checked for mistakes:
:set nocompatible
:filetype off
:set rtp+=~/.vim/bundle/vundle/
:call vundle#rc()
:syntax on
:set cursorline cursorcolumn
:hi CursorLine cterm=NONE ctermbg=green ctermfg=white guibg=144 guifg=144
:hi CursorColumn cterm=NONE ctermbg=green ctermfg=white guibg=144 guifg=144
:nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
:Bundle 'gmarik/vundle'
:filetype plugin indent on
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
NEVER do anything inside $VIMRUNTIME
. All your settings belong to the ~/.vimrc
file and all your plugins/colorschemes/whatever belong to the ~/.vim
directory.
Return $VIMRUNTIME
to its pristine state and put all your settings and plugins where they belong.
Also, you don't need the :
before Ex commands in a script.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.