Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I use pathogen and have an update script that downloads the latest versions of all the vim plugins I use from vim.org, github, or wherever else they may be. However, this script does not currently update the vim helptags. In order to do so, I have to go to each updated plugin in vim and execute ":helptags doc/". It would be great if I could do so with my update script, but in order to do so I need to run the vim ":helptags" command from a script. Is this possible?

Thanks!

question from:https://stackoverflow.com/questions/4180590/vim-helptag-generation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
92 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...