Hi Marc, On Wed, Nov 21, 2018 at 3:38 AM Marc Weber <marco-owe...@gmx.de> wrote: > > If you are working on it that's what I've been using: > https://github.com/MarcWeber/vim-addon-signs >
I looked at the above Vim plugin. It looks like this plugin provides a function for grouping signs by name and updating them. The discussed changes in this thread to the new signs API will provide a similar functionality natively. > > The main problem is that you have to set numbers. > If two plugins set signs there might be collisions by accident. > This can be avoided if the sign identifiers are unique within a sign group. Then each plugin can create its own sign group. > > The second problem I had: If you have a breakpoint at line 5 you never > want it to move. Eg my vim-addon-xdebug does use it, too. > > Maybe this input helps designing new interfaces. > I am attaching an updated help text description for the signs functions. Note that this doesn't include the support for sign groups yet. Regards, Yegappan -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
sign_define({name} [, {dict}]) *sign_define()* Define a new sign named {name} or set attributes for an existing sign. This is similar to the |:sign-define| command. The optional {dict} argument specifies the sign attributes. The following values are supported: icon full path to the bitmap file for the sign. linehl highlight group used for the whole line the sign is placed in. text text that is displayed when there is no icon or the GUI is not being used. texthl highlight group used for the text item Returns 0 on success and -1 on failure. Examples: > call sign_define("mySign", {"text" : "=>", "texthl" : \ "Error", "linehl" : "Search"}) < sign_getdefined([{name}]) *sign_getdefined()* Get a list of defined signs and their attributes. This is similar to the |:sign-list| command. If the {name} is not supplied, then a list of all the defined signs is returned. Otherwise the attribute of the specified sign is returned. Each list item in the returned value is a dictionary with the following entries: icon full path to the bitmap file of the sign linehl highlight group used for the whole line the sign is placed in. name name of the sign text text that is displayed when there is no icon or the GUI is not being used. texthl highlight group used for the text item Returns an empty List on failure. Examples: > " Get a list of all the defined signs echo sign_getdefined() " Get the attribute of the sign named mySign echo sign_getdefined("mySign") < sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()* Return a list of signs placed in a buffer or all the buffers. This is similar to the |:sign-place-list| command. If the optional buffer name {expr} is specified, then only the list of signs placed in that buffer is returned. For the use of {expr}, see |bufname()|. The optional {dict} can contain the following entries: lnum return information about signs placed in this line. For the use of {lnum}, see |line()|. id return information about signs with this identifier If no arguments are supplied, then signs placed in all the buffers are returned. Each list item in the returned value is a dictionary with the following entries: bufnr number of the buffer with the sign signs list of signs placed in {bufnr}. Each list item is a dictionary with the below listed entries The dictionary for each sign contains the following entries: id identifier of the sign lnum line number where the sign is placed name name of the defined sign Returns an empty list on failure. Examples: > " Get a List of all the signs placed in eval.c echo sign_getplaced("eval.c") " Get a List of the sign placed at line 10 in eval.c echo sign_getplaced("eval.c", 10) " Get a List of all the placed signs echo sign_getplaced() < sign_place({id}, {name}, {expr} [, {lnum}]) *sign_place()* Place the sign defined as {name} at line {lnum} in file {expr} and assign {id} to sign. This is similar to the |:sign-place| command. For the use of {expr}, see |bufname()|. For the use of {lnum}, see |line()|. If the optional {lnum} is not specified, then changes the placed sign {id} to use the defined sign {name}. Returns 0 on success and -1 on failure. Examples: > " Place a sign named mySign with id 5 at line 20 in " buffer json.c call sign_place(5, "mySign", "json.c", 20) " Updates sign 5 in buffer json.c to use newSign call sign_place(5, "newSign", "json.c") < sign_undefine({name}) *sign_undefine()* Deletes a previously defined sign {name}. This is similar to the |:sign-undefine| command. Returns 0 on success and -1 on failure. Examples: > " Delete a sign named mySign call sign_undefine("mySign") < sign_unplace({id} [, {expr}]) *sign_unplace()* Remove a previously placed sign {id} from buffer {expr}. This is similar to the |:sign-unplace()| command. For the use of {expr}, see |bufname()|. If {id} is zero, then removes all the signs placed in buffer {expr}. If {expr} is not supplied, then removes sign {id} from all the buffers. Returns 0 on success and -1 on failure. Examples: > " Remove sign 10 from buffer eval.c call sign_unplace(10, "eval.c") " Remove all the signs placed in buffer 5 call sign_unplace(0, 5) " Remove sign 20 from all the files call sign_unplace(20) " Remove all the placed signs call sign_unplace(0) <