vimrc - I am learning vimscript recently, how can I make gvim automatically load the file after the vimscript file is modified?
怪我咯
怪我咯 2017-05-16 16:34:28
0
1
482

For examplea.vimThe content is as follows

let a = 1
echo a    "输出1

When I modify let a = 1 to let a = 2, I need to run the command :source a.vim to output the modified result2.
I hope that gvim can automatically load a.vim after a.vim is modified.
How to do this? Please give me some advice from the experts.

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
迷茫

You can consider using autocmd BufWritePost to trigger events when saving and automatically run the source command

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!