日期:2014-05-16  浏览次数:20703 次

vim autocmd
fedora 系统,我用vim编辑器更改了~/.bashrc,但是每次更改完了都得source ~/.bashrc,很繁琐,怎么在.vimrc中添加autocmd使得每当保存~/.bashrc时,都自动执行source ~/.bashrc

------解决方案--------------------
你想要的是不是这个功能呢?
http://stackoverflow.com/questions/1694599/how-do-i-get-vims-sh-command-to-source-my-bashrc
只要在.vimrc中加上一句话就可以了
------解决方案--------------------
autocmd! bufwritepost .vimrc source ~/.vimrc