vim - Run python code in vim editor

Create demo file /tmp/demo.txt,

AAAAAAAAAAAA
BBBBBBBBBBBB

abc = "/Hello World/"
print(abc)

Operations:

  1. In visual mode, select text area.
    Please use key V, j.

  2. Input commands:
    :!python

vim - Run python code in vim editor_第1张图片

你可能感兴趣的:(vim,python)