Continuing the Boost your VIM series with the next neat vim plugin – pathogen!
Last time, I showed you one of my favorite bash utilities (which happens to work so wonderfully with vim) – tmux.
This time, I will introduce you to my weapon of choice when it comes to plugin managers.
It’s called pathogen. This is the best and yet simplest plugin manager there is.
There are others, like Vundle, which I’ve tried in the past but none can beat pathogen’s simplicity.
It’s so simple (in fact, the total source code is ~250 lines), that this will be a pretty simple post as well.
So, if you’re ready to hack your VIM with some neat plugins, start with this one and make your life easier.
Introduction
Pathogen is a plugin manager for vim. This allows you to easily install plugins without much hassle.
Normally, you would have to distribute different files of the plugins to different places.
Pathogen does this all for you. All you need to do, is git clone
the vim plugin repo in a specified folder (normally ~/.vim/bundle
and that’s it.
Installation
Taken directly from the original repo:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Next, add this to your ~/.vimrc
:
execute pathogen#infect()
That’s it!
How to use
Anytime you would like to try out a new vim plugin run this:
git clone <vim plugin repo> ~/.vim/bundle
For example, if you would like to install Nerdtree, run this command:
git clone https://github.com/scrooloose/nerdtree ~/.vim/bundle
Finally, when inside your vim, in order to populate the vim docs with the new plugin documentation, run :Helptags
After that, all that is left is to configure the specific plugin according to its help page and repo README. If needed.
Conclusion
So there you have it. Your best vim plugin manager. I just love how simple it is.
There is no need to bother with any other once you get this baby going.
For more cool vim plugin showcases, watch this space and subscribe.