Interactive Python programming in ... vi [was: Tab wars revisited]

Mark 'Kamikaze' Hughes kamikaze at
Thu Jul 15 19:31:48 CEST 2004

Jacek Generowicz <jacek.generowicz at>
wrote on 15 Jul 2004 09:18:09 +0200:
> Mark 'Kamikaze' Hughes <kamikaze at> writes:
>>   Simple way: Select the block of code you want to execute with V and
>> motion keys, then !python^M
> This looks like it sends each code snippet to a new interpreter

  It sends the entire selected block to a new interpreter, yes.  Not
each line to a different interpreter, if that's what you're trying to

> ... which is pretty useless for interactive incremental development.

  Not so.  I do that all the time, and it's extremely useful for quickly
getting a value or for complex text manipulation.  I often do things

results = dostuff(foo)
print results

>>   Complex way: :help python, and read.
> Sorry, too complex for me. I'll try to find a vim user and try to work
> out with him, whether this is of any use.

  So rather than read a brief, carefully-written article which is
included in Vim itself, you'd rather waste the time of someone else and
make them recite the same information from memory?  Inconsiderate much?

>>   Vim's considerably faster to work with than emacs
> Well that rather depends on which you are more familiar with, wouldn't
> you say ?

  You know, I might say that...

>> You're just not familiar with it yet.

  OH, LOOK, I DID!  HOW DID YOU KNOW?  Don't be a twat.

> And probably never will be. My operating system (Emacs) comes with an
> excellent, fully integrated editor. I have no need for vi.

  Huh.  I always thought it was an incredibly slow and awkward Lisp
interpreter, with a fairly weak shell (it is not an OS), and a really
lousy editor with too many modifier keys on top.  Since I've got Python,
Linux and FreeBSD, and Vim with Python scripting compiled in, it has
nothing to offer me.

  But you asked how Vim does that, and in a snarky way implying that it
couldn't.  You were wrong, and now you're upset at being corrected.  If
you had the slightest trace of manners you'd say "Thanks for the
information, I'll read that".  Alas.

 <a href=""> Mark Hughes </a>
"The void breathed hard on my heart, turning its illusions to ice, shattering
 them.  Was reborn, then, free to scrawl own design on this morally blank
 world.  Was Rorschach." --Alan Moore, _Watchmen #6_, "The Abyss Gazes Also"

More information about the Python-list mailing list