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!
Shouldn’t all of the documentation be in the same
docdirectory? Maybe .vim/doc, /usr/share/vim/vimfiles/doc?In any case, you can launch vim, and direct it to run a command:
You can specify multiple commands, so the last one can be
-c qto 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 usingvim -S <script>; again, you can make the last command of the scriptqso it closes when it’s done.