On 26-Jan-13 16:34:17 +0100, ZyX wrote:

>> this patch adds the possibility to query for the existence of sign
>> ids using exists().
>>
>> Current idea is to use exists('#number') to check for the numeric id
>> (and thus it can't be an autocommand).
> 
> I don’t like the overloading: exists('#…') is already ambigious*, don’
> t make it more ambigious: it *can* be an autocmd group. I would rather
> suggest “>N” for place ids and reserve “>>name” for defined sign
> names.
> 
> * “#abc” can mean “augroup” or “event”, same for “#abc#pattern”. Also
> note that autocmd group name can contain a hash (and even a space
> which prevents using it in :doau). Thus there is no way to check
> whether random autocmd group is defined using “exists()” (“#abc#def”
> is always “#event_or_group#pattern”).

Yes, this is complex enough already. The sign stuff is lacking good Vimscript
support in general (one needs to resort to capture and parse :sign output with
:redir), as exemplified by this Stack Overflow question:

http://stackoverflow.com/questions/14502710/query-position-of-sign-in-vim-with-sign-id

Maybe we should add an entire Vimscript API (i.e. sign...() functions), and
handle this there?!

-- regards, ingo

-- 
-- 
You received this message from the "vim_dev" 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



Raspunde prin e-mail lui