I would try something like this in your .vimrc or your ftplugin/python_ft.vim
command Pyrun execute "!python %"
command Intpyrun execute "!python -i %"
Then :Pyrun
and :Intpyrun
should work
You could then map a function key to each
map <F5> :Pyrun<CR>
map <F6> :Intpyrun<CR>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…