How can you use Python in Vim?

前端 未结 12 1754
清酒与你
清酒与你 2020-12-07 06:43

I waste a lot of time between Vim and Python. I find it too slow to manually copy-paste from Python to Vim and vice versa. A good broken example is:

%

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 07:21

    if you have written your python script in a new [No Name] buffer, then you can use following:

    :0,$!python
    

    when you have a no name buffer then you can not use '%', hence the need for 0,$ which means all lines in buffer starting with line zero until the last line

    output will be written in buffer and unfortunately not at the end

提交回复
热议问题