Python Vim Module - works

Andrei Kulakov sill at optonline.net
Wed Nov 14 01:00:34 EST 2001


On Wed, 14 Nov 2001 02:50:33 GMT, Tim Hammerquist <tim at vegeta.ath.cx> wrote:
> 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?

Oh, I understand what it *does*. I just don't understand what is the
purpose, i.e. what would be a useful application of this module?

I'm asking because I love vim and I used python vim module and if
someone finds this thing useful, I might too..


> 
> Tim Hammerquist


-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org



More information about the Python-list mailing list