Save and run at the same time in Vim

前端 未结 12 551
悲哀的现实
悲哀的现实 2021-01-30 03:13

I do a lot of Python quick simulation stuff and I\'m constantly saving (:w) and then running (:!!). Is there a way to combine these actions?

Maybe a "save and run&qu

12条回答
  •  死守一世寂寞
    2021-01-30 03:39

    Another possibility:

    au BufWriteCmd *.py write | !!
    

    Though this will run every time you save, which might not be what you want.

提交回复
热议问题