Question

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
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top