[Tutor] VIM & Python

Carroll, Barry Barry.Carroll at psc.com
Thu Oct 12 00:45:05 CEST 2006


I'm a Vim user, too.  I usually have three windows open: IPython to try
out snippets of code, ViM to edit the target program, and a command
shell to execute the module/run the self tests.  A while back I asked
the ViM mailing list (vim at vim.org) if there was a way to open a shell
window from within ViM.  Here is the response I got:  

** Vim can be compiled with Python support; the output of the ":version"

** command will then show either +python or +python/dyn

** With such a version of Vim, you can execute individual Python
commands, 
** inline Python documents in Vim scripts, or full-fledged Python
scripts. 
** Also, Python commands called from Vim may access Vim buffers,
windows, 
** variables, etc., giving you access to the power of both Vim and
Python 
** in a single script. Of course, 'T Aint No Such Thing As A Free Lunch:

** such a script is more powerful but less portable, since it can only
be 
** run on a machine where both Vim and Python are installed.

** See ":help python" for details of how to use the Python interface.

I read the suggested help pages, but I haven't had the nerve to try out
the interface yet.  When I do, I'll post my findings here.  

Regards,
 
Barry
barry.carroll at psc.com
541-302-1107
________________________
We who cut mere stones must always be envisioning cathedrals.

-Quarry worker's creed

> -----Original Message-----
> Date: Wed, 11 Oct 2006 21:40:56 +0100
> Subject: [Tutor] VIM & Python
> To: tutor at python.org
> 
> > I use VIM to write my Python programs. I usually have a shell open
> > to run
> > pyflakes on the file I just edited. Is there a way to run pyflakes
> > from
> > within VIM and have it display the errors in another buffer?



More information about the Tutor mailing list