我是 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
.我不确定,我是新手。
最佳答案
不,永远不要碰系统文件。
无论你在 /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
关于ubuntu - 当我在 ubuntu 12.10 上启动 vim 时,没有执行病原体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16495609/