Python Vim Module - works

Tim Hammerquist tim at vegeta.ath.cx
Tue Nov 13 21:50:33 EST 2001


Andrei Kulakov <sill at optonline.net> graced us by uttering:
[ snip ]
>> $ gvim --servername TEST
>> $ python
>>>>> import vim
>>>>> vim.list()
>> ['TEST']
>>>>> vim.send('TEST', 'iHello World!<ESC>')
>> 
>> You should see the string "Hello World!" neatly typed into the newly opened 
>> vim window!!!
> 
> I'm sorry if this is a dumb question, but what's the purpose of this?

Jonathan wrote an extension module for Python that can access each
instance of gvim on an X display from _outside_ of vim.

Vim can also be compiled to use Python and/or Perl as an internal
scripting language, and the Python engine has a builtin module called
'vim' that grants access to vim internals (buffer lists, lines of
buffers, etc.) As this module is useful but unavailable outside of vim,
Jonathan wrote his own.

Or did I misunderstand your question?

Tim Hammerquist
-- 
No violence, gentlemen -- no violence, I beg of you!  Consider the furniture!
    -- Sherlock Holmes



More information about the Python-list mailing list