Home » Questions » Computers [ Ask a new question ]

Vim: execute the script I'm working on in a split screen

Vim: execute the script I'm working on in a split screen

I'm working on a small python script, which needs frequent execution in order to debug and further develop.

Asked by: Guest | Views: 374
Total answers/comments: 4
Guest [Entry]

"Add this line to your .vimrc:

command R !./%

And then you can just type "":R"" while in Vim to run the script (vim-run-current-file)"
Guest [Entry]

"The least verbose way (which requires your script to be executable) is probably:

:!%"
Guest [Entry]

There is a similar StackOverflow question.
Guest [Entry]

"map <F5> :w<CR>:exe "":!python "" . getreg(""%"") . """" <CR>

Is what I used with please (F5 runs the current script).

For turning vim into a powerful python IDE i recommend this tutorial:

http://sontek.net/blog/detail/turning-vim-into-a-modern-python-ide"