Friday, January 25, 2013

Re: Scripting with Python, capturing command output and using signs

> http://stackoverflow.com/questions/14502710/query-position-of-sign-in-vim-with-sign-id/14503016
> http://stackoverflow.com/questions/14504403/capture-output-of-vim-command-in-python/14506534

eventually have a look at vim-addon-signs. You pass a list of
file,line,sign_type to a function, and the plugin does everything else.

Its you keeping a list of signs the way you want, just making the script
update everything else. Maybe it just solves your problem.

The sign interface is broken by design, because two scripts could be
using the same sign numbers by accident.

> vim.command('redir => myvar')
> vim.command('silent sign place')
> vim.command('redir END')
> output = vim.eval('myvar')
> Is this the best way of doing it or am I missing something?
Talk about what you want to do. Such as
- I want to debug python code within vim
- I want to get XY, and I think redir is the nicest way to get what I
want like this, do you see a shorter way?

Other than that it looks like you know how to read :h signs - if a
feature is not listed there it might not exist.

Marc Weber

--
--
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

No comments:

Post a Comment