Program Python in VIM

François Pinard pinard at iro.umontreal.ca
Thu Jan 22 11:59:27 EST 2004


[Peter Wu]
> I'm giving vim a try to program Python. The following are the steps I
> follow to code/test a python program.

> vi test.py
> [key in some python code]
> :wq
> :!python test.py

> Is there any other way? I don't want to type 'python test.py' every time
> I've made any modifications. In Emacs, I can simply fire C-c C-c to fire
> the python interpreter. Thanks!

I do not know if there is a better way, but what I do for one is to
create a small Makefile like:


try:
	python test.py


(there is really a TAB above), and then, from `vim', do `:make'.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list