La méthode la plus simple pour désactiver un plug-in lorsque vous utilisez Pathogen consiste à ajouter son nom à la variable g: pathogen_disabled, avant de démarrer pathogen.
Ainsi, un exemple de ma propre 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()
Mise à jour: Une autre méthode, soutenue par Pathogen, est de simplement renommer le répertoire du paquet que vous souhaitez désactiver afin qu'il se termine par un tilde (~). Donc, pour désactiver le bundle autocomplpop
, il suffit de le renommer en autocomplpop~
.
La stratégie tilde ne semble pas fonctionner maintenant (à partir de la version 2.3). – echristopherson
@echristopherson Cela devrait être de retour dans le pathogène maintenant, sur la branche dev au moins. – FDinoff
A partir de '2.4', il devient' g: pathogen_blacklist' à la place. –