Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试:autocmd BufWrite * make在 vim 中添加到模式行,但它没有被触发。我看到帮助说只能set <options>在模型中使用。有没有办法达到这个效果,我写一个文件来运行make.
:autocmd BufWrite * make
set <options>
make
~/.vimrc使用与您的文件名匹配的模式在您的 autocmd 中设置。我还建议使用augroup它,以便可以重新获取它。
~/.vimrc
augroup
augroup my_project autocmd! autocmd BufWrite /project/*.c make augroup END
如需更多帮助,请参阅:
:h :au :h :aug