Vim helptag generation

Shouldn't all of the documentation be in the same doc directory? Maybe .vim/doc, /usr/share/vim/vimfiles/doc?

In any case, you can launch vim, and direct it to run a command:

cd <plugindir>
vim -c "helptags doc/"

You can specify multiple commands, so the last one can be -c q to have vim exit when you're done. (Or you can tack it on as one command, command1 | q.) Or, if you have many commands to run, you can generate a script, and have vim run it using vim -S <script>; again, you can make the last command of the script q so it closes when it's done.


pathogen.vim versions after 1.2 (2010-01-17) have a pathogen#helptags function that will automatically update the help tags for each directory in the runtimepath. Just call it after you call pathogen#runtime_append_all_bundles:

call pathogen#runtime_append_all_bundles()
call pathogen#helptags()

Or, assuming you have call pathogen#runtime_append_all_bundles() in your .vimrc:

vim -c 'call pathogen#helptags()|q'

from the command line only once after you have fetched the updates.


Recent versions of pathogen recommend calling pathogen#infect() in your .vimrc instead of pathogen#runtime_append_all_bundles (since b147125 “Add pathogen#infect() as primary entry point for basic setup”, 2011-05-13; the former calls the latter internally). If your .vimrc is calling pathogen#infect(), then put your call to pathogen#helptags() after that.

Tags:

Vim