暂时禁用vim中使用病原体的一些插件.

Som*_*DOS 96 vim plugins

我想我在一个插件中有一个bug.我想只加载这个插件,而不必删除我的pathogen的bundle文件夹中的所有其他包,进行调试.

可能吗?

jer*_*oen 129

使用Pathogen时禁用插件的最简单方法是在启动病原体之前将其捆绑名称添加到g:pathogen_disabled变量中.

这是我自己的vimrc的一个例子

" To disable a plugin, add it's bundle name to the following list
let g:pathogen_disabled = []

" for some reason the csscolor plugin is very slow when run on the terminal
" but not in GVim, so disable it if no GUI is running
if !has('gui_running')
    call add(g:pathogen_disabled, 'csscolor')
endif

" Gundo requires at least vim 7.3
if v:version < '703' || !has('python')
    call add(g:pathogen_disabled, 'gundo')
endif

if v:version < '702'
    call add(g:pathogen_disabled, 'autocomplpop')
    call add(g:pathogen_disabled, 'fuzzyfinder')
    call add(g:pathogen_disabled, 'l9')
endif

call pathogen#infect()
Run Code Online (Sandbox Code Playgroud)

更新:Pathogen支持的另一种方法是简单地重命名要禁用的包的目录,使其以波浪号(〜)结束.因此,要禁用该autocomplpop捆绑包,只需将其重命名为autocomplpop~.

  • 从"2.4"开始,它变成了`g:pathogen_blacklist`. (8认同)
  • @echristopherson现在应该回到病原体,至少在dev分支上. (6认同)

fra*_*ous 36

vim -u NONE -N将加载vim没有插件,没有.vimrc的设置.然后你可以:source /path/to/plugin/you-want.vim在vim里面加载你想要加载的一个插件.


Reg*_*isz 9

vim --noplugin

在这种情况下,vim不会加载任何插件,但会使用你的vimrc.

在vim中加载插件之后:

:source'你的插件路径'