How to execute file I'm editing in Vi(m)

后端 未结 13 1852
悲哀的现实
悲哀的现实 2020-12-04 05:45

How to execute file that I\'m editing in Vi(m) and get output in split window (like in SciTE)?

Of course I could execute it like that:

:!scriptname
<         


        
13条回答
  •  不知归路
    2020-12-04 06:04

    I use a slightly more intrusive mechanism through maps:

    map ;e :w:exe ":!python " . getreg("%") . "" 
    

    Just makes it so I don't have to save, then go. Just go.

提交回复
热议问题