我的 .vimrc 文件以这样的方式配置,每次保存 Python 文件或输入 python 缓冲区(也适用于 Matlab 和 Latex,但都是相同的)时,它会默默地执行丰富的 ctags:
set tags+=./tags
autocmd BufWritePost *.py silent !ctags *.py
autocmd BufEnter *.py silent !ctags *.py
autocmd BufWritePost *.m silent !ctags *.m
autocmd BufEnter *.m silent !ctags *.m
autocmd BufWritePost *.tex silent !ctags *.tex
autocmd BufEnter *.tex silent !ctags *.tex
有时我会使用这些信息来浏览我的文件。这在 Mac OS X 和 Linux 中运行良好。上个月左右,我不得不使用 Windows 7。当我将这些行添加到我的 .vimrc 中时,它会在我面前闪烁一个 cmd 提示符,这非常令人讨厌。我还尝试了 !start 而不是silent,这带来了许多其他问题,其中最主要的是每次在 :w 之后都必须按 Enter 键。
我缺少什么?是否可以复制我的 OS X 配置,其中执行命令、更新标签文件、重新加载所有内容,而不会闪烁 cmd 提示符,也不会出现其他问题?
您可能想检查
autocmd BufEnter *.tex silent! !start /min ctags *.tex
或者,尝试/b /wait
.
也可以看看https://serverfault.com/questions/31608/can-i-run-a-gui-program-in-the-background-on-the-windows-command-line/31621#31621 https://serverfault.com/questions/31608/can-i-run-a-gui-program-in-the-background-on-the-windows-command-line/31621#31621
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)