Interactive Python programming in ... vi [was: Tab wars revisited]
jacek.generowicz at cern.ch
Mon Jul 19 09:03:42 CEST 2004
sjdevnull at yahoo.com (G. S. Hayes) writes:
> The vimsh package allows you to run a shell under Vim; among other
> things, you can run python under this shell. I do this all the time,
> with macros to run selected line(s) from my python code in the Python
> window, maintaining state in between sending lines through Python--so
> running "i=100", then going back to editing and later running "i=i+1",
> "print i" will print 101.
> This runs seperately from Vim's built-in Python interpreter, so you
> don't have to worry about namespace collisions, etc (in fact, you can
> easily have several vimsh python windows each running their own
> interpreters, just like in emacs).
> vimsh doesn't have smart terminal emulation (just dumb ptys), though,
> so you can run line-oriented programs fine this way, but you can't run
> e.g. curses or advanced termcap programs in any useful way. Not a big
> deal for me.
Sounds promising. Thanks for the pointer.
Just one thing (and please remember that I do not use vim, so much of
this is alien to me) ... I heard it mentioned a number of times that
Python must be compiled into vim, and in the link you posted the words
"for python enabled [g]vim" appear. Is vim typically Python-enabled
out of the box, or does the user have to compile it in? The problem is
that we have a lot of centrally managed software here, and if users
will need to replace the standard vim with their own version, then
that is likely to lose a lot of potential users.
More information about the Python-list