我认为某个插件存在问题。我想要仅加载该插件进行调试,而不必删除路径中其他 pathogen bundle 文件夹中的全部捆绑包。
这可行吗?
使用Pathogen时禁用插件最简单的方法是在启动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()
更新:另一种方法是通过 Pathogen 支持的,只需将想要禁用的 bundle 的目录重命名为以波浪线(~)结尾。因此,要禁用 autocomplpop
bundle,只需将其重命名为 autocomplpop~
。
vim -u NONE -N
会打开没有插件和不使用你的 .vimrc 配置文件的 vim。在 vim 中你可以执行 :source /path/to/plugin/you-want.vim
命令来加载你想要的插件。
vim -u NONE -N
启动 vim,然后在 vim 中输入 :filetype plugin on
以启用文件类型插件。 - frabjousvim --noplugin
在这种情况下,vim将不会加载任何插件,但是您的vimrc将被使用。:source 'your plugin path'
为什么不这样做:
完成后将一切恢复原状。(如果是一个简单的单文件插件,则建议使用加载没有插件的Vim并源代码插件文件的方法,但如果你正在做一个ftplugin,那么移动目录可能是最好的方法,而且也不难。)
您可以通过在插件原始名称后面加上波浪线~来重新命名特定的插件。 所有以波浪线~结尾的插件文件夹将不会被Pathogen加载。
2.4
开始,它变成了g:pathogen_blacklist
。 - Yuri Ghensev