tags:

views:

312

answers:

4

I want to know how do you manage your vim plugins.

As it is, One of the biggest fun of using is that one can easily try many interesing new plugins, just download it and unzip it in under ~/.vim. But if you try too often and try too much, you might get trouble as confilct of key mapping , in compatitble script version, dpendency between different plugin .....

Then you want to remove some plugin ,kind of like rollback your vim to a sound condition. But, the rollback could be very painful . cus for some "giant" plugin, like perl-support ( it's great plugin, anyway), will consist of many vim scripts which spread in different dirctories. To remove single one giant plugin will be anoying, not too mention if you remvoe many plugin at one time.

In a word , I'm looking for good practice for managing vim plugins.

A: 

I versionning my vimconfig directory in github. So If I add a plugin I made a new commit. If I want remove it, I revert this commit.

After I link .vimrc in vimrc file in my directory and my .vim directory to this directory

shingara
A: 

I exclusivley install plugins via Vimballs. This way I can also keep plugins up-to-date across installations.

What I like about vimballs is that I can see directly where files came from. Otherwise I would probably something like git.

honk
+3  A: 

I have my vim directory in git.

All plugins that have an upstream public git repo are in ~/.vim/plugins-git/ as git submodules. My vimrc sets the runtimepath to include the directories in ~/.vim/plugin-git/ so the plugins can stay self contained and can very easily be updated to the latest git commit.

The rest of my plugins are in ~/.vim/plugin/.

One script that's out there that makes this type of setup much easier is pathogen.vim. pathogen.vim sets up all the runtimepath entries for you so you don't have to. It's worth looking into for sure. I don't use pathogen because by setting the paths explicitly in my vimrc I can quickly disable plugins if there are conflicts or incompatibilities like you mentioned.

Randy Morris
A: 

I'm working mostly on Windows, so this may differ somewhat for Linux, Unix and co. but if you help vimfiles you'll see that vim has an order of loading files. First comes the ones in $HOME directory (somewhere under Documents and Settings-Username on WinXP machines), then come the $VIM directory (your actual directory where vim resides) and so on ...

So, I have vim in a directory which consists of "stable" stuff. Whenever I wish to try out a new plugin, I put it in Documents and Settings... folder, and it gets loaded before the one in $VIM directory. That way I can easily upon not liking it, delete the new plugin. If I do like it, and it plays nicely with the ones I already have, it goes in the $VIM directory.

(this probably makes no sense the way I put it, but it works ... probably :)

ldigas