Vim 101: Help Tags

Alex R. Young
usevim
Published in
1 min readJan 21, 2013

I’ve seen many people confused by Vim’s help system, particularly when installing a new plugin. An IRC friend of mine had installed Tim Pope’s rails.vim, and couldn’t work out why :help rails didn't work. The reason for this is Vim has to be told about new help files through the :helptags command.

Vim itself has documentation for :helptags in :help :helptags, and the command can be abbreviated to :helpt. Running it with the directory your plugin was installed to will make the help file available.

Let’s say you’ve installed rails.vim to ~/.vim/bundle/vim-rails because you use Pathogen, then to generate the help tags you'd have to type :helpt ~/.vim/bundle/vim-rails/doc.

However, realising that generating help tags is often a chore, Pathogen includes a :Helptags command that automatically generates help tags for every directory in runtimepath. Also, Vundle automatically generates help tags for the plugins it manages.

If you’re used to other editors, then having to run a command to make plugin help files available might seem a bit strange at first, but it’s just one of those things you need to be aware of when using Vim.

As for runtimepath, I'll explain more about that in a future Vim 101 post.

--

--