我是VIM的新手。我尝试安装pathogen.vim插件。我将描述文件夹结构。
--- /etc/vim
-vimrc
-vimrc.tiny
-autoload
-pathogen.vim
-bundle
我还没有添加任何内容。
在vimrc文件中,我添加了几行
call pathogen#infect()
syntax on
filetype plugin indent on
但是每当我从终端开始使用vim时,它就会抛出错误。
错误 -
Error detected while processing /usr/share/vim/vimrc:
line 57:
E117: Unknown function: pathogen#infect
Press ENTER or type command to continue
然后我尝试添加
runtime /etc/vim/autoload/pathogen.vim
在调用病原体感染功能之上,但没有发生任何事情。并且在错误中显示的路径为/usr/share/vim/vimrc
,可能是因为etc/vim/vimrc is the symlink
。我不确定,我是新手。
答案 0 :(得分:8)
否。请勿触摸系统文件。
您在/etc
中所做的一切必须在/home/username
中完成:
/home/username/.vim <-- the directory where you put your plugins
and colorschemes and stuff
/home/username/.vimrc <-- the file where you put your settings
病原体插件应该在那里:
/home/username/.vim/autoload/pathogen.vim
捆绑目录应该在那里:
/home/username/.vim/bundle
这三行应该在这个文件中:
/home/username/.vimrc