Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Temporarily disable some plugins using pathogen in vim.

Tags:

vim

plugins

I think I have a bug in one plugin. I would like to load only this plugin, without having to delete all the other bundles in my pathogen's bundle folder, to debug.

Is it possible?

like image 571
Somebody still uses you MS-DOS Avatar asked Nov 23 '10 22:11

Somebody still uses you MS-DOS


People also ask

How do I disable Vim plugins?

On the begin of the script file find something Like if exists('g:vimacs_is_loaded")... . Then set this variable in your . vimrc or while start vim with vim --cmd "let g:vimacs_is_loaded = 1" . Show activity on this post. This way, whenever I want to open a file with snippets disabled, it is easy.

What is pathogen in Vim?

vim-pathogen is a runtimepath manager created by Tim Pope to make it easy to install plugins and runtime files in their own private directories.


1 Answers

The easiest method to disable a plugin when you use Pathogen is by adding it's bundle name to the g:pathogen_disabled variable, before starting pathogen.

So an example from my own 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() 

Update: Another method, supported by Pathogen, is to simply rename the directory for the bundle you want to disable so that it ends in a tilde (~). So to disable the autocomplpop bundle, simply rename it to autocomplpop~.

like image 61
jeroen Avatar answered Oct 03 '22 17:10

jeroen