September 10, 2018

Vim plugins

The overwhelming recommendations is to not just install plugins willy-nilly but to use a plugin manager. At one time I used Pathogen, but the current recommendation is to use something called Vundle. If you find yourself reading tutorials discussing Pathogen, that is old information and you should move on. Here is the drill to install Vundle. This is explained on the Github page. I had no previous ".vim/bundle" so there was no confusion about doing the following:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
After doing this, you add a bunch of stuff to your .vimrc file as shown on the Github page. You should go there to find out the most recent stuff that is needed. After adding "the stuff" you can launch the editor and type ":PluginInstall" or give the following command.
vim +PluginInstall +qall
I have no clue what this does, but this is what you are told to do. My impression is that it does nothing at all, unless you added "Plugin" lines for not yet installed plugins when you added "the stuff" to your vimrc.

The "central idea" in all of this seems to be that a single "Plugin" line in your .vimrc file enables (or disables if commented out) a given plugin. This was also the central idea in Pathogen, but Vundle adds a management interface to vim, which we will discuss next.

Once you have Vundle installed you can use :PluginList to list all plugins. Not ":Plugins" as some apparently out of date documentation indicates.

You can also launch the management interface via ":PluginInstall". This opens a new vim buffer (so if you are not used to using multiple buffers in Vim, this will be surprising). You close down this thing via :bdelete. It gives you some help up top (there are single letter keystrokes). You can also continue to do things using colon commands, like:

:PluginSearch! taglist
When I type this, it gives me the Vundle buffer with two choices loaded. I want the classic "taglist.vim", so I move the cursor to it and type "i" to install it. This simply fetches taglist.vim and places it into .vim/bundle. Nothing has been done to the .vimrc yet, you have to do that by hand, adding a line like:
Plugin 'taglist.vim'

Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]