Vim:无法获得病原体来装载束

时间:2013-02-04 20:03:27

标签: vim ubuntu pathogen

我已经在Stackoverflow和github等上读过其他五个关于此的问题,但是还没有能够解决这个问题,而且此时我完全迷失了。

我使用的是Vim 7.3的Ubuntu 11.10。

这是我的.vimrc

set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()
colorscheme xoria256
set rnu
set expandtab
set tabstop=2
set shiftwidth=2
set cindent
set virtualedit=all

pathogen.vim在〜/ .vim / autoload中,我在〜/ .vim / bundle /

中有vim-jade和vim-surround

当我运行vim index.jade时,我没有任何错误我只是没有语法高亮,我不能使用vim环绕命令。

任何帮助都会摇滚!我已经在这几个小时了。

2 个答案:

答案 0 :(得分:1)

您只需要对病原体进行一次调用,这必须在您filetype plugin indent on之前完成。

此版本的~/.vimrc应该有效。

set nocompatible
call pathogen#infect()
syntax on
filetype plugin indent on
colorscheme xoria256
set relativenumber
set expandtab
set tabstop=2
set shiftwidth=2
set cindent
set virtualedit=all

答案 1 :(得分:1)

  1. 在包中创建一个包含插件名称的目录

    mkdir~ / .vim / bundle / surround /

  2. 将插件解压缩到您创建的目录。

    cp~ / surround.zip~ / .vim / bundle / surround / cd~ / .vim / bundle / surround / 解压缩surround.zip rm -rf surround.zip

  3. 将这些行添加到〜/ .vimrc

    的开头

    执行病原体#infect() 语法

  4. 上的filetype插件缩进

    现在您可以使用surround.vim插件了。

相关问题