On Jan 20, 7:47 pm, gearheart <[email protected]> wrote:
> As I understand, vim's python API just provides simple methods for
> text manipulation and a function to run vimscript.
> Are there any other methods or third-party python library for extended
> vim automation.
> Something to bind python function on keystroke or use python function
> for complete function or event handler, for example.

You can do most of these things by writing wrappers in vimscript that
call python functions. This is used extensively in vimuiex
(http://www.vim.org/scripts/script.php?script_id=2606).

Check the function
   function! vimuiex#vxlist#VxPopup(items, title, ...)
in vxlist.vim to see how to prepare a python call and
    doVimCallback(self, cmd, curindex)
in popuplist.py for an implementation of callbacks in python
that call into vim.

For keymaps you can try to use the vim command 'python'.
I prefer to write vimscript wrappers, though.

Marko


-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to