sign.txt 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. *sign.txt* Nvim
  2. VIM REFERENCE MANUAL by Gordon Prieur
  3. and Bram Moolenaar
  4. Sign Support Features *sign-support*
  5. Type |gO| to see the table of contents.
  6. ==============================================================================
  7. 1. Introduction *sign-intro* *signs*
  8. When a debugger or other IDE tool is driving an editor it needs to be able
  9. to give specific highlights which quickly tell the user useful information
  10. about the file. One example of this would be a debugger which had an icon
  11. in the left-hand column denoting a breakpoint. Another example might be an
  12. arrow representing the Program Counter (PC). The sign features allow both
  13. placement of a sign, or icon, in the left-hand side of the window and
  14. definition of a highlight which will be applied to that line. Displaying the
  15. sign as an image is most likely only feasible in gvim (although Sun
  16. Microsystem's dtterm does support this it's the only terminal emulator I know
  17. of which does). A text sign and the highlight should be feasible in any color
  18. terminal emulator.
  19. Signs and highlights are not useful just for debuggers. There are plugins
  20. that use signs to mark build errors or display version control status.
  21. There are two steps in using signs:
  22. 1. Define the sign. This specifies the image, text and highlighting. For
  23. example, you can define a "break" sign with an image of a stop roadsign and
  24. text "!!".
  25. 2. Place the sign. This specifies the file and line number where the sign is
  26. displayed. A defined sign can be placed several times in different lines
  27. and files.
  28. *sign-column*
  29. When signs are defined for a file, Vim will automatically add a column of two
  30. characters to display them in. When the last sign is unplaced the column
  31. disappears again. This behavior can be changed with the 'signcolumn' option.
  32. The color of the column is set with the SignColumn highlight group
  33. |hl-SignColumn|. Example to set the color: >
  34. :highlight SignColumn guibg=darkgrey
  35. <
  36. If 'cursorline' is enabled, then the CursorLineSign highlight group is used
  37. |hl-CursorLineSign|.
  38. *sign-identifier*
  39. Each placed sign is identified by a number called the sign identifier. This
  40. identifier is used to jump to the sign or to remove the sign. The identifier
  41. is assigned when placing the sign using the |:sign-place| command or the
  42. |sign_place()| function. Each sign identifier should be a unique number. If
  43. multiple placed signs use the same identifier, then jumping to or removing a
  44. sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
  45. be used. The |sign_place()| function can be called with a zero sign identifier
  46. to allocate the next available identifier.
  47. *sign-group*
  48. Each placed sign can be assigned to either the global group or a named group.
  49. When placing a sign, if a group name is not supplied, or an empty string is
  50. used, then the sign is placed in the global group. Otherwise the sign is
  51. placed in the named group. The sign identifier is unique within a group. The
  52. sign group allows Vim plugins to use unique signs without interfering with
  53. other plugins using signs.
  54. *sign-priority*
  55. Each placed sign is assigned a priority value. When multiple signs are placed
  56. on the same line, the attributes of the sign with the highest priority is used
  57. independently of the sign group. The default priority for a sign is 10. The
  58. priority is assigned at the time of placing a sign.
  59. When two signs with the same priority are present, and one has an icon or text
  60. in the signcolumn while the other has line highlighting, then both are
  61. displayed.
  62. When the line on which the sign is placed is deleted, the sign is moved to the
  63. next line (or the last line of the buffer, if there is no next line). When
  64. the delete is undone the sign does not move back.
  65. ==============================================================================
  66. 2. Commands *sign-commands* *:sig* *:sign*
  67. Here is an example that places a sign "piet", displayed with the text ">>", in
  68. line 23 of the current file: >
  69. :sign define piet text=>> texthl=Search
  70. :exe ":sign place 2 line=23 name=piet file=" .. expand("%:p")
  71. And here is the command to delete it again: >
  72. :sign unplace 2
  73. Note that the ":sign" command cannot be followed by another command or a
  74. comment. If you do need that, use the |:execute| command.
  75. DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
  76. See |sign_define()| for the equivalent Vim script function.
  77. :sign define {name} {argument}...
  78. Define a new sign or set attributes for an existing sign.
  79. The {name} can either be a number (all digits) or a name
  80. starting with a non-digit. Leading zeros are ignored, thus
  81. "0012", "012" and "12" are considered the same name.
  82. About 120 different signs can be defined.
  83. Accepted arguments:
  84. icon={bitmap}
  85. Define the file name where the bitmap can be found. Should be
  86. a full path. The bitmap should fit in the place of two
  87. characters. This is not checked. If the bitmap is too big it
  88. will cause redraw problems.
  89. toolkit supports ~
  90. Win32 .bmp, .ico, .cur
  91. linehl={group}
  92. Highlighting group used for the whole line the sign is placed
  93. in. Most useful is defining a background color.
  94. numhl={group}
  95. Highlighting group used for the line number on the line where
  96. the sign is placed. Overrides |hl-LineNr|, |hl-LineNrAbove|,
  97. |hl-LineNrBelow|, and |hl-CursorLineNr|.
  98. text={text} *E239*
  99. Define the text that is displayed when there is no icon or the
  100. GUI is not being used. Only printable characters are allowed
  101. and they must occupy one or two display cells.
  102. texthl={group}
  103. Highlighting group used for the text item.
  104. culhl={group}
  105. Highlighting group used for the text item when the cursor is
  106. on the same line as the sign and 'cursorline' is enabled.
  107. Example: >
  108. :sign define MySign text=>> texthl=Search linehl=DiffText
  109. <
  110. DELETING A SIGN *:sign-undefine* *E155*
  111. See |sign_undefine()| for the equivalent Vim script function.
  112. :sign undefine {name}
  113. Deletes a previously defined sign. If signs with this {name}
  114. are still placed this will cause trouble.
  115. Example: >
  116. :sign undefine MySign
  117. <
  118. LISTING SIGNS *:sign-list* *E156*
  119. See |sign_getdefined()| for the equivalent Vim script function.
  120. :sign list Lists all defined signs and their attributes.
  121. :sign list {name}
  122. Lists one defined sign and its attributes.
  123. PLACING SIGNS *:sign-place* *E158*
  124. See |sign_place()| for the equivalent Vim script function.
  125. :sign place {id} line={lnum} name={name} file={fname}
  126. Place sign defined as {name} at line {lnum} in file {fname}.
  127. *:sign-fname*
  128. The file {fname} must already be loaded in a buffer. The
  129. exact file name must be used, wildcards, $ENV and ~ are not
  130. expanded, white space must not be escaped. Trailing white
  131. space is ignored.
  132. The sign is remembered under {id}, this can be used for
  133. further manipulation. {id} must be a number.
  134. It's up to the user to make sure the {id} is used only once in
  135. each file (if it's used several times unplacing will also have
  136. to be done several times and making changes may not work as
  137. expected).
  138. The following optional sign attributes can be specified before
  139. "file=":
  140. group={group} Place sign in sign group {group}
  141. priority={prio} Assign priority {prio} to sign
  142. By default, the sign is placed in the global sign group.
  143. By default, the sign is assigned a default priority of 10. To
  144. assign a different priority value, use "priority={prio}" to
  145. specify a value. The priority is used to determine the sign
  146. that is displayed when multiple signs are placed on the same
  147. line.
  148. Examples: >
  149. :sign place 5 line=3 name=sign1 file=a.py
  150. :sign place 6 group=g2 line=2 name=sign2 file=x.py
  151. :sign place 9 group=g2 priority=50 line=5
  152. \ name=sign1 file=a.py
  153. <
  154. :sign place {id} line={lnum} name={name} [buffer={nr}]
  155. Same, but use buffer {nr}. If the buffer argument is not
  156. given, place the sign in the current buffer.
  157. Example: >
  158. :sign place 10 line=99 name=sign3
  159. :sign place 10 line=99 name=sign3 buffer=3
  160. <
  161. *E885*
  162. :sign place {id} name={name} file={fname}
  163. Change the placed sign {id} in file {fname} to use the defined
  164. sign {name}. See remark above about {fname} |:sign-fname|.
  165. This can be used to change the displayed sign without moving
  166. it (e.g., when the debugger has stopped at a breakpoint).
  167. The optional "group={group}" attribute can be used before
  168. "file=" to select a sign in a particular group. The optional
  169. "priority={prio}" attribute can be used to change the priority
  170. of an existing sign.
  171. Example: >
  172. :sign place 23 name=sign1 file=/path/to/edit.py
  173. <
  174. :sign place {id} name={name} [buffer={nr}]
  175. Same, but use buffer {nr}. If the buffer argument is not
  176. given, use the current buffer.
  177. Example: >
  178. :sign place 23 name=sign1
  179. :sign place 23 name=sign1 buffer=7
  180. <
  181. REMOVING SIGNS *:sign-unplace* *E159*
  182. See |sign_unplace()| for the equivalent Vim script function.
  183. :sign unplace {id} file={fname}
  184. Remove the previously placed sign {id} from file {fname}.
  185. See remark above about {fname} |:sign-fname|.
  186. :sign unplace {id} group={group} file={fname}
  187. Same but remove the sign {id} in sign group {group}.
  188. :sign unplace {id} group=* file={fname}
  189. Same but remove the sign {id} from all the sign groups.
  190. :sign unplace * file={fname}
  191. Remove all placed signs in file {fname}.
  192. :sign unplace * group={group} file={fname}
  193. Remove all placed signs in group {group} from file {fname}.
  194. :sign unplace * group=* file={fname}
  195. Remove all placed signs in all the groups from file {fname}.
  196. :sign unplace {id} buffer={nr}
  197. Remove the previously placed sign {id} from buffer {nr}.
  198. :sign unplace {id} group={group} buffer={nr}
  199. Remove the previously placed sign {id} in group {group} from
  200. buffer {nr}.
  201. :sign unplace {id} group=* buffer={nr}
  202. Remove the previously placed sign {id} in all the groups from
  203. buffer {nr}.
  204. :sign unplace * buffer={nr}
  205. Remove all placed signs in buffer {nr}.
  206. :sign unplace * group={group} buffer={nr}
  207. Remove all placed signs in group {group} from buffer {nr}.
  208. :sign unplace * group=* buffer={nr}
  209. Remove all placed signs in all the groups from buffer {nr}.
  210. :sign unplace {id}
  211. Remove the previously placed sign {id} from all files it
  212. appears in.
  213. :sign unplace {id} group={group}
  214. Remove the previously placed sign {id} in group {group} from
  215. all files it appears in.
  216. :sign unplace {id} group=*
  217. Remove the previously placed sign {id} in all the groups from
  218. all the files it appears in.
  219. :sign unplace *
  220. Remove all placed signs in the global group from all the files.
  221. :sign unplace * group={group}
  222. Remove all placed signs in group {group} from all the files.
  223. :sign unplace * group=*
  224. Remove all placed signs in all the groups from all the files.
  225. :sign unplace
  226. Remove a placed sign at the cursor position. If multiple signs
  227. are placed in the line, then only one is removed.
  228. :sign unplace group={group}
  229. Remove a placed sign in group {group} at the cursor
  230. position.
  231. :sign unplace group=*
  232. Remove a placed sign in any group at the cursor position.
  233. LISTING PLACED SIGNS *:sign-place-list*
  234. See |sign_getplaced()| for the equivalent Vim script function.
  235. :sign place file={fname}
  236. List signs placed in file {fname}.
  237. See remark above about {fname} |:sign-fname|.
  238. :sign place group={group} file={fname}
  239. List signs in group {group} placed in file {fname}.
  240. :sign place group=* file={fname}
  241. List signs in all the groups placed in file {fname}.
  242. :sign place buffer={nr}
  243. List signs placed in buffer {nr}.
  244. :sign place group={group} buffer={nr}
  245. List signs in group {group} placed in buffer {nr}.
  246. :sign place group=* buffer={nr}
  247. List signs in all the groups placed in buffer {nr}.
  248. :sign place List placed signs in the global group in all files.
  249. :sign place group={group}
  250. List placed signs with sign group {group} in all files.
  251. :sign place group=*
  252. List placed signs in all sign groups in all files.
  253. JUMPING TO A SIGN *:sign-jump* *E157*
  254. See |sign_jump()| for the equivalent Vim script function.
  255. :sign jump {id} file={fname}
  256. Open the file {fname} or jump to the window that contains
  257. {fname} and position the cursor at sign {id}.
  258. See remark above about {fname} |:sign-fname|.
  259. If the file isn't displayed in window and the current file can
  260. not be |abandon|ed this fails.
  261. :sign jump {id} group={group} file={fname}
  262. Same but jump to the sign in group {group}
  263. :sign jump {id} [buffer={nr}] *E934*
  264. Same, but use buffer {nr}. This fails if buffer {nr} does not
  265. have a name. If the buffer argument is not given, use the
  266. current buffer.
  267. :sign jump {id} group={group} [buffer={nr}]
  268. Same but jump to the sign in group {group}
  269. ==============================================================================
  270. 3. Functions *sign-functions-details*
  271. sign_define({name} [, {dict}]) *sign_define()*
  272. sign_define({list})
  273. Define a new sign named {name} or modify the attributes of an
  274. existing sign. This is similar to the |:sign-define| command.
  275. Prefix {name} with a unique text to avoid name collisions.
  276. There is no {group} like with placing signs.
  277. The {name} can be a String or a Number. The optional {dict}
  278. argument specifies the sign attributes. The following values
  279. are supported:
  280. icon full path to the bitmap file for the sign.
  281. linehl highlight group used for the whole line the
  282. sign is placed in.
  283. numhl highlight group used for the line number where
  284. the sign is placed.
  285. text text that is displayed when there is no icon
  286. or the GUI is not being used.
  287. texthl highlight group used for the text item
  288. culhl highlight group used for the text item when
  289. the cursor is on the same line as the sign and
  290. 'cursorline' is enabled.
  291. If the sign named {name} already exists, then the attributes
  292. of the sign are updated.
  293. The one argument {list} can be used to define a list of signs.
  294. Each list item is a dictionary with the above items in {dict}
  295. and a "name" item for the sign name.
  296. Returns 0 on success and -1 on failure. When the one argument
  297. {list} is used, then returns a List of values one for each
  298. defined sign.
  299. Examples: >
  300. call sign_define("mySign", {
  301. \ "text" : "=>",
  302. \ "texthl" : "Error",
  303. \ "linehl" : "Search"})
  304. call sign_define([
  305. \ {'name' : 'sign1',
  306. \ 'text' : '=>'},
  307. \ {'name' : 'sign2',
  308. \ 'text' : '!!'}
  309. \ ])
  310. <
  311. Can also be used as a |method|: >
  312. GetSignList()->sign_define()
  313. sign_getdefined([{name}]) *sign_getdefined()*
  314. Get a list of defined signs and their attributes.
  315. This is similar to the |:sign-list| command.
  316. If the {name} is not supplied, then a list of all the defined
  317. signs is returned. Otherwise the attribute of the specified
  318. sign is returned.
  319. Each list item in the returned value is a dictionary with the
  320. following entries:
  321. icon full path to the bitmap file of the sign
  322. linehl highlight group used for the whole line the
  323. sign is placed in; not present if not set.
  324. name name of the sign
  325. numhl highlight group used for the line number where
  326. the sign is placed; not present if not set.
  327. text text that is displayed when there is no icon
  328. or the GUI is not being used.
  329. texthl highlight group used for the text item; not
  330. present if not set.
  331. culhl highlight group used for the text item when
  332. the cursor is on the same line as the sign and
  333. 'cursorline' is enabled; not present if not
  334. set.
  335. Returns an empty List if there are no signs and when {name} is
  336. not found.
  337. Examples: >
  338. " Get a list of all the defined signs
  339. echo sign_getdefined()
  340. " Get the attribute of the sign named mySign
  341. echo sign_getdefined("mySign")
  342. <
  343. Can also be used as a |method|: >
  344. GetSignList()->sign_getdefined()
  345. sign_getplaced([{buf} [, {dict}]]) *sign_getplaced()*
  346. Return a list of signs placed in a buffer or all the buffers.
  347. This is similar to the |:sign-place-list| command.
  348. If the optional buffer name {buf} is specified, then only the
  349. list of signs placed in that buffer is returned. For the use
  350. of {buf}, see |bufname()|. The optional {dict} can contain
  351. the following entries:
  352. group select only signs in this group
  353. id select sign with this identifier
  354. lnum select signs placed in this line. For the use
  355. of {lnum}, see |line()|.
  356. If {group} is '*', then signs in all the groups including the
  357. global group are returned. If {group} is not supplied or is an
  358. empty string, then only signs in the global group are
  359. returned. If no arguments are supplied, then signs in the
  360. global group placed in all the buffers are returned.
  361. See |sign-group|.
  362. Each list item in the returned value is a dictionary with the
  363. following entries:
  364. bufnr number of the buffer with the sign
  365. signs list of signs placed in {bufnr}. Each list
  366. item is a dictionary with the below listed
  367. entries
  368. The dictionary for each sign contains the following entries:
  369. group sign group. Set to '' for the global group.
  370. id identifier of the sign
  371. lnum line number where the sign is placed
  372. name name of the defined sign
  373. priority sign priority
  374. The returned signs in a buffer are ordered by their line
  375. number and priority.
  376. Returns an empty list on failure or if there are no placed
  377. signs.
  378. Examples: >
  379. " Get a List of signs placed in eval.c in the
  380. " global group
  381. echo sign_getplaced("eval.c")
  382. " Get a List of signs in group 'g1' placed in eval.c
  383. echo sign_getplaced("eval.c", {'group' : 'g1'})
  384. " Get a List of signs placed at line 10 in eval.c
  385. echo sign_getplaced("eval.c", {'lnum' : 10})
  386. " Get sign with identifier 10 placed in a.py
  387. echo sign_getplaced("a.py", {'id' : 10})
  388. " Get sign with id 20 in group 'g1' placed in a.py
  389. echo sign_getplaced("a.py", {'group' : 'g1',
  390. \ 'id' : 20})
  391. " Get a List of all the placed signs
  392. echo sign_getplaced()
  393. <
  394. Can also be used as a |method|: >
  395. GetBufname()->sign_getplaced()
  396. <
  397. *sign_jump()*
  398. sign_jump({id}, {group}, {buf})
  399. Open the buffer {buf} or jump to the window that contains
  400. {buf} and position the cursor at sign {id} in group {group}.
  401. This is similar to the |:sign-jump| command.
  402. For the use of {buf}, see |bufname()|.
  403. Returns the line number of the sign. Returns -1 if the
  404. arguments are invalid.
  405. Example: >
  406. " Jump to sign 10 in the current buffer
  407. call sign_jump(10, '', '')
  408. <
  409. Can also be used as a |method|: >
  410. GetSignid()->sign_jump()
  411. <
  412. *sign_place()*
  413. sign_place({id}, {group}, {name}, {buf} [, {dict}])
  414. Place the sign defined as {name} at line {lnum} in file or
  415. buffer {buf} and assign {id} and {group} to sign. This is
  416. similar to the |:sign-place| command.
  417. If the sign identifier {id} is zero, then a new identifier is
  418. allocated. Otherwise the specified number is used. {group} is
  419. the sign group name. To use the global sign group, use an
  420. empty string. {group} functions as a namespace for {id}, thus
  421. two groups can use the same IDs. Refer to |sign-identifier|
  422. and |sign-group| for more information.
  423. {name} refers to a defined sign.
  424. {buf} refers to a buffer name or number. For the accepted
  425. values, see |bufname()|.
  426. The optional {dict} argument supports the following entries:
  427. lnum line number in the file or buffer
  428. {buf} where the sign is to be placed.
  429. For the accepted values, see |line()|.
  430. priority priority of the sign. See
  431. |sign-priority| for more information.
  432. If the optional {dict} is not specified, then it modifies the
  433. placed sign {id} in group {group} to use the defined sign
  434. {name}.
  435. Returns the sign identifier on success and -1 on failure.
  436. Examples: >
  437. " Place a sign named sign1 with id 5 at line 20 in
  438. " buffer json.c
  439. call sign_place(5, '', 'sign1', 'json.c',
  440. \ {'lnum' : 20})
  441. " Updates sign 5 in buffer json.c to use sign2
  442. call sign_place(5, '', 'sign2', 'json.c')
  443. " Place a sign named sign3 at line 30 in
  444. " buffer json.c with a new identifier
  445. let id = sign_place(0, '', 'sign3', 'json.c',
  446. \ {'lnum' : 30})
  447. " Place a sign named sign4 with id 10 in group 'g3'
  448. " at line 40 in buffer json.c with priority 90
  449. call sign_place(10, 'g3', 'sign4', 'json.c',
  450. \ {'lnum' : 40, 'priority' : 90})
  451. <
  452. Can also be used as a |method|: >
  453. GetSignid()->sign_place(group, name, expr)
  454. <
  455. *sign_placelist()*
  456. sign_placelist({list})
  457. Place one or more signs. This is similar to the
  458. |sign_place()| function. The {list} argument specifies the
  459. List of signs to place. Each list item is a dict with the
  460. following sign attributes:
  461. buffer buffer name or number. For the accepted
  462. values, see |bufname()|.
  463. group sign group. {group} functions as a namespace
  464. for {id}, thus two groups can use the same
  465. IDs. If not specified or set to an empty
  466. string, then the global group is used. See
  467. |sign-group| for more information.
  468. id sign identifier. If not specified or zero,
  469. then a new unique identifier is allocated.
  470. Otherwise the specified number is used. See
  471. |sign-identifier| for more information.
  472. lnum line number in the buffer {buf} where the
  473. sign is to be placed. For the accepted values,
  474. see |line()|.
  475. name name of the sign to place. See |sign_define()|
  476. for more information.
  477. priority priority of the sign. When multiple signs are
  478. placed on a line, the sign with the highest
  479. priority is used. If not specified, the
  480. default value of 10 is used. See
  481. |sign-priority| for more information.
  482. If {id} refers to an existing sign, then the existing sign is
  483. modified to use the specified {name} and/or {priority}.
  484. Returns a List of sign identifiers. If failed to place a
  485. sign, the corresponding list item is set to -1.
  486. Examples: >
  487. " Place sign s1 with id 5 at line 20 and id 10 at line
  488. " 30 in buffer a.c
  489. let [n1, n2] = sign_placelist([
  490. \ {'id' : 5,
  491. \ 'name' : 's1',
  492. \ 'buffer' : 'a.c',
  493. \ 'lnum' : 20},
  494. \ {'id' : 10,
  495. \ 'name' : 's1',
  496. \ 'buffer' : 'a.c',
  497. \ 'lnum' : 30}
  498. \ ])
  499. " Place sign s1 in buffer a.c at line 40 and 50
  500. " with auto-generated identifiers
  501. let [n1, n2] = sign_placelist([
  502. \ {'name' : 's1',
  503. \ 'buffer' : 'a.c',
  504. \ 'lnum' : 40},
  505. \ {'name' : 's1',
  506. \ 'buffer' : 'a.c',
  507. \ 'lnum' : 50}
  508. \ ])
  509. <
  510. Can also be used as a |method|: >
  511. GetSignlist()->sign_placelist()
  512. sign_undefine([{name}]) *sign_undefine()*
  513. sign_undefine({list})
  514. Deletes a previously defined sign {name}. This is similar to
  515. the |:sign-undefine| command. If {name} is not supplied, then
  516. deletes all the defined signs.
  517. The one argument {list} can be used to undefine a list of
  518. signs. Each list item is the name of a sign.
  519. Returns 0 on success and -1 on failure. For the one argument
  520. {list} call, returns a list of values one for each undefined
  521. sign.
  522. Examples: >
  523. " Delete a sign named mySign
  524. call sign_undefine("mySign")
  525. " Delete signs 'sign1' and 'sign2'
  526. call sign_undefine(["sign1", "sign2"])
  527. " Delete all the signs
  528. call sign_undefine()
  529. <
  530. Can also be used as a |method|: >
  531. GetSignlist()->sign_undefine()
  532. sign_unplace({group} [, {dict}]) *sign_unplace()*
  533. Remove a previously placed sign in one or more buffers. This
  534. is similar to the |:sign-unplace| command.
  535. {group} is the sign group name. To use the global sign group,
  536. use an empty string. If {group} is set to '*', then all the
  537. groups including the global group are used.
  538. The signs in {group} are selected based on the entries in
  539. {dict}. The following optional entries in {dict} are
  540. supported:
  541. buffer buffer name or number. See |bufname()|.
  542. id sign identifier
  543. If {dict} is not supplied, then all the signs in {group} are
  544. removed.
  545. Returns 0 on success and -1 on failure.
  546. Examples: >
  547. " Remove sign 10 from buffer a.vim
  548. call sign_unplace('', {'buffer' : "a.vim", 'id' : 10})
  549. " Remove sign 20 in group 'g1' from buffer 3
  550. call sign_unplace('g1', {'buffer' : 3, 'id' : 20})
  551. " Remove all the signs in group 'g2' from buffer 10
  552. call sign_unplace('g2', {'buffer' : 10})
  553. " Remove sign 30 in group 'g3' from all the buffers
  554. call sign_unplace('g3', {'id' : 30})
  555. " Remove all the signs placed in buffer 5
  556. call sign_unplace('*', {'buffer' : 5})
  557. " Remove the signs in group 'g4' from all the buffers
  558. call sign_unplace('g4')
  559. " Remove sign 40 from all the buffers
  560. call sign_unplace('*', {'id' : 40})
  561. " Remove all the placed signs from all the buffers
  562. call sign_unplace('*')
  563. < Can also be used as a |method|: >
  564. GetSigngroup()->sign_unplace()
  565. <
  566. sign_unplacelist({list}) *sign_unplacelist()*
  567. Remove previously placed signs from one or more buffers. This
  568. is similar to the |sign_unplace()| function.
  569. The {list} argument specifies the List of signs to remove.
  570. Each list item is a dict with the following sign attributes:
  571. buffer buffer name or number. For the accepted
  572. values, see |bufname()|. If not specified,
  573. then the specified sign is removed from all
  574. the buffers.
  575. group sign group name. If not specified or set to an
  576. empty string, then the global sign group is
  577. used. If set to '*', then all the groups
  578. including the global group are used.
  579. id sign identifier. If not specified, then all
  580. the signs in the specified group are removed.
  581. Returns a List where an entry is set to 0 if the corresponding
  582. sign was successfully removed or -1 on failure.
  583. Example: >
  584. " Remove sign with id 10 from buffer a.vim and sign
  585. " with id 20 from buffer b.vim
  586. call sign_unplacelist([
  587. \ {'id' : 10, 'buffer' : "a.vim"},
  588. \ {'id' : 20, 'buffer' : 'b.vim'},
  589. \ ])
  590. <
  591. Can also be used as a |method|: >
  592. GetSignlist()->sign_unplacelist()
  593. <
  594. vim:tw=78:ts=8:noet:ft=help:norl: