From ce6446b1197bef1271945272108c6919cdcfcb24 Mon Sep 17 00:00:00 2001 From: Dmitry Chumak Date: Fri, 2 Sep 2022 20:16:36 +0300 Subject: [PATCH] [vim] python files execute selection --- vim/ftplugin/python.vim | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vim/ftplugin/python.vim diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim new file mode 100644 index 0000000..a4ba4a5 --- /dev/null +++ b/vim/ftplugin/python.vim @@ -0,0 +1,6 @@ +fu PyRun() range + echo system('python -c ' . shellescape(join(getline(a:firstline, a:lastline), "\n"))) +endf + +vmap :call PyRun() +