[英]Vim returns Vundle related errors when I open my vimrc file
I installed Vundle and it does work. 我安装了Vundle,它确实可以工作。 I can open a blank or existing file in vim and use Bundle commands just fine.
我可以在vim中打开一个空白文件或现有文件,然后使用Bundle命令就可以了。 However, when I use vim to edit my vimrc file in /etc/vim, I get the following error:
但是,当我使用vim编辑/ etc / vim中的vimrc文件时,出现以下错误:
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: 这是我的vimrc文件的内容,我复制了vundle安装中使用的行并检查了错误:
: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
. 切勿在
$VIMRUNTIME
内部执行任何操作。 All your settings belong to the ~/.vimrc
file and all your plugins/colorschemes/whatever belong to the ~/.vim
directory. 您的所有设置都属于
~/.vimrc
文件,而所有的plugins / colorschemes /其他都属于~/.vim
目录。
Return $VIMRUNTIME
to its pristine state and put all your settings and plugins where they belong. 将
$VIMRUNTIME
恢复为原始状态,并将所有设置和插件放在它们所属的位置。
Also, you don't need the :
before Ex commands in a script. 另外,脚本中的Ex命令之前不需要
:
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.