Vim Plugins: Pathogen

If you like vim and ever came to the conclusion you lost control over what is in your $HOME/.vim directory (I have currently a mix of 44 plugins and a bunch of personal adjustments there) then the pathogen plugin is the solution. It more or less gives you more than one .vim directory to work with. Each directory under $HOME/.vim/bundle is added to the runtimepath.

I am now using the .vim directory only for plugins handled by GetLatestVimScripts plugin.

Plugins checked out from repository, not supported by GetLatestVimScripts, only installed for evaluation purposes or developed by me go each into its own directory under ~/.vim/bundle.

My personal settings and plugin adjustments (The after directory) go to .vim/bundle/mjansen.

This setup finally allowed me to get the control back.

Mike

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks

Thanks for the answers
Comment by Shafqat Bhuiyan (not verified) on Nov 3rd, 2010 at 1:34 am

A few questions

I find this plugin very handy as well. But one thing I had a problem with was single file plugins. I had to manually create folders for them so that pathogen would load them. Is there a way to automatically load .vim files in the ~/.vim/bundle directory? Also are there easy ways to deal with .vba files when using pathogen? Or do you have to manually move the files into ~/.vim/bundle after the .vba plugin installed?
Comment by Shafqat Bhuiyan (not verified) on Oct 27th, 2010 at 7:37 pm

A few answers

Remember the pathogen plugin adds directories to the runtimepath. If you do not know what that is have a look at help 'runtimepath'. In short it is a directory that is searched for all types of files. For plugins, filetype plugins, syntax files, compiler definition and more. The complete structure is described in the vim documentation given above.

That's why the pathogen plugin can't support the use case you described. It can not know what kind of file you put there. As a workaround you could create one bundle named onescriptplugin and put all those files into it.

But the best solution normally would be to add all those plugins to your ~/.vim/GetLatest/GetLatestVimScripts.dat(See help GLVS) and have them updated automatically. GLVS does not support bundles. See my setup above.

With the vba files it is the same for me. Currently all vba based plugins are handled by GetLatestVimScript and therefore i never had the need to manually unpack them. A look into the documentation brought up this information.You may override the use of the |'runtimepath'| by specifying a variable, g:vimball_home.(help g:vimball_home). You should be able to use it to extract your plugins into thebundledirectory with this.

Happy viming

Comment by Mike on Oct 28th, 2010 at 11:36 am

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent comments