1- *sign.txt* For Vim version 8.1. Last change: 2016 Aug 17
1+ *sign.txt* For Vim version 8.1. Last change: 2018 Dec 21
22
33
44 VIM REFERENCE MANUAL by Gordon Prieur
@@ -51,6 +51,20 @@ The color of the column is set with the SignColumn group |hl-SignColumn|.
5151Example to set the color: >
5252
5353 :highlight SignColumn guibg=darkgrey
54+ <
55+ *sign-group*
56+ Each sign can be assigned to either the global group or a named group. When
57+ placing a sign, if a group name is not supplied, or an empty string is used,
58+ then the sign is placed in the global group. Otherwise the sign is placed in
59+ the named group. The sign identifier is unique within a group. The sign group
60+ allows Vim plugins to use unique signs without interfering with other plugins
61+ using signs.
62+
63+ *sign-priority*
64+ Each placed sign is assigned a priority value. When multiple signs are placed
65+ on the same line, the attributes of the sign with the highest priority is used
66+ independent of the sign group. The default priority for a sign is 10. The
67+ priority is assigned at the time of placing a sign.
5468
5569==============================================================================
56702. Commands *sign-commands* *:sig* *:sign*
@@ -69,6 +83,8 @@ comment. If you do need that, use the |:execute| command.
6983
7084DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
7185
86+ See | sign_define() | for the equivalent Vim script function.
87+
7288:sign define {name} {argument} ...
7389 Define a new sign or set attributes for an existing sign.
7490 The {name} can either be a number (all digits) or a name
@@ -106,13 +122,18 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
106122
107123DELETING A SIGN *:sign-undefine* *E155*
108124
125+ See | sign_undefine() | for the equivalent Vim script function.
126+
109127:sign undefine {name}
110128 Deletes a previously defined sign. If signs with this {name}
111129 are still placed this will cause trouble.
112130
113131
132+
114133LISTING SIGNS *:sign-list* *E156*
115134
135+ See | sign_getdefined() | for the equivalent Vim script function.
136+
116137:sign list Lists all defined signs and their attributes.
117138
118139:sign list {name}
@@ -121,6 +142,8 @@ LISTING SIGNS *:sign-list* *E156*
121142
122143PLACING SIGNS *:sign-place* *E158*
123144
145+ See | sign_place() | for the equivalent Vim script function.
146+
124147:sign place {id} line={lnum} name={name} file={fname}
125148 Place sign defined as {name} at line {lnum} in file {fname} .
126149 *:sign-fname*
@@ -136,6 +159,25 @@ PLACING SIGNS *:sign-place* *E158*
136159 to be done several times and making changes may not work as
137160 expected).
138161
162+ The following optional sign attributes can be specified before
163+ "file=":
164+ group={group} Place sign in sign group {group}
165+ priority={prio} Assign priority {prio} to sign
166+
167+ By default, the sign is placed in the global sign group.
168+
169+ By default, the sign is assigned a default priority of 10. To
170+ assign a different priority value, use "priority={prio} " to
171+ specify a value. The priority is used to determine the
172+ highlight group used when multiple signs are placed on the
173+ same line.
174+
175+ Examples: >
176+ :sign place 5 line=3 name=sign1 file=a.py
177+ :sign place 6 group=g2 line=2 name=sign2 file=x.py
178+ :sign place 9 group=g2 priority=50 line=5
179+ \ name=sign1 file=a.py
180+ <
139181:sign place {id} line={lnum} name={name} buffer={nr}
140182 Same, but use buffer {nr} .
141183
@@ -146,47 +188,100 @@ PLACING SIGNS *:sign-place* *E158*
146188 This can be used to change the displayed sign without moving
147189 it (e.g., when the debugger has stopped at a breakpoint).
148190
191+ The optional "group={group} " attribute can be used before
192+ "file=" to select a sign in a particular group.
193+
149194:sign place {id} name={name} buffer={nr}
150195 Same, but use buffer {nr} .
151196
152197
153198REMOVING SIGNS *:sign-unplace* *E159*
154199
200+ See | sign_unplace() | for the equivalent Vim script function.
201+
155202:sign unplace {id} file={fname}
156203 Remove the previously placed sign {id} from file {fname} .
157204 See remark above about {fname} | :sign-fname | .
158205
206+ :sign unplace {id} group={group} file={fname}
207+ Same but remove the sign {id} in sign group {group} .
208+
209+ :sign unplace {id} group=* file={fname}
210+ Same but remove the sign {id} from all the sign groups.
211+
159212:sign unplace * file={fname}
160213 Remove all placed signs in file {fname} .
161214
215+ :sign unplace * group={group} file={fname}
216+ Remove all placed signs in group {group} from file {fname} .
217+
218+ :sign unplace * group=* file={fname}
219+ Remove all placed signs in all the groups from file {fname} .
220+
162221:sign unplace {id} buffer={nr}
163222 Remove the previously placed sign {id} from buffer {nr} .
164223
224+ :sign unplace {id} group={group} buffer={nr}
225+ Remove the previously placed sign {id} in group {group} from
226+ buffer {nr} .
227+
228+ :sign unplace {id} group=* buffer={nr}
229+ Remove the previously placed sign {id} in all the groups from
230+ buffer {nr} .
231+
165232:sign unplace * buffer={nr}
166233 Remove all placed signs in buffer {nr} .
167234
235+ :sign unplace * group={group} buffer={nr}
236+ Remove all placed signs in group {group} from buffer {nr} .
237+
238+ :sign unplace * group=* buffer={nr}
239+ Remove all placed signs in all the groups from buffer {nr} .
240+
168241:sign unplace {id}
169242 Remove the previously placed sign {id} from all files it
170243 appears in.
171244
245+ :sign unplace {id} group={group}
246+ Remove the previously placed sign {id} in group {group} from
247+ all files it appears in.
248+
249+ :sign unplace {id} group=*
250+ Remove the previously placed sign {id} in all the groups from
251+ all the files it appears in.
252+
172253:sign unplace *
173- Remove all placed signs.
254+ Remove all placed signs in the global group.
255+
256+ :sign unplace * group=*
257+ Remove all placed signs in all the groups.
174258
175259:sign unplace
176260 Remove the placed sign at the cursor position.
177261
178262
179263LISTING PLACED SIGNS *:sign-place-list*
180264
265+ See | sign_getplaced() | for the equivalent Vim script function.
266+
181267:sign place file={fname}
182268 List signs placed in file {fname} .
183269 See remark above about {fname} | :sign-fname | .
184270
271+ :sign place group={group} file={fname}
272+ List signs in group {group} placed in file {fname} .
273+
185274:sign place buffer={nr}
186275 List signs placed in buffer {nr} .
187276
277+ :sign place group={group} buffer={nr}
278+ List signs in group {group} placed in buffer {nr} .
279+
188280:sign place List placed signs in all files.
189281
282+ :sign place group={group}
283+ List placed signs in all sign groups in all the files.
284+
190285
191286JUMPING TO A SIGN *:sign-jump* *E157*
192287
0 commit comments