Vim scripting with python

Stuart D. Gathman stuart at bmsi.com
Sat Feb 3 18:21:38 EST 2007


On Sat, 03 Feb 2007 05:02:54 -0800, Tool69 wrote:

> Does anyone have any advice, and more genraly how to script Vim with
> Python ?

:py import sys
:py print sys.version
:help :py

> I know I can put some python functions inside my vimrc file like
> this :
> 
> function! My_function()
> python << EOF
> import vim, string
> ...blablabla
> EOF
> endfunction
> 
> but I would like to use external ".py" files.

:py import myfile

Use :py inside your vimrc - don't run python externally.
-- 
	      Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Python-list mailing list