Vim 帮助标签生成 [英] Vim helptag generation
问题描述
我使用病原体并有一个更新脚本,可以从 vim.org、github 或其他任何地方下载我使用的所有 vim 插件的最新版本.但是,此脚本当前不更新 vim 帮助标签.为此,我必须在 vim 中访问每个更新的插件并执行:helptags doc/".如果我可以用我的更新脚本来这样做会很棒,但为了这样做,我需要从脚本运行 vim ":helptags" 命令.这可能吗?
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?
谢谢!
推荐答案
不是所有的文档都应该在同一个 doc
目录中吗?也许 .vim/doc、/usr/share/vim/vimfiles/doc?
Shouldn't all of the documentation be in the same doc
directory? Maybe .vim/doc, /usr/share/vim/vimfiles/doc?
无论如何,您都可以启动 vim,并引导它运行命令:
In any case, you can launch vim, and direct it to run a command:
cd <plugindir>
vim -c "helptags doc/"
你可以指定多个命令,所以最后一个命令可以是 -c q
完成后让 vim 退出.(或者你可以把它作为一个命令添加,command1 | q
.)或者,如果你有很多命令要运行,你可以生成一个脚本,然后让 vim 使用 vim 运行它 -<脚本>
;再次,您可以执行脚本 q
的最后一个命令,以便在完成后关闭.
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.
这篇关于Vim 帮助标签生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!