aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/sign.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/sign.txt')
-rw-r--r--runtime/doc/sign.txt54
1 files changed, 46 insertions, 8 deletions
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index 5079d900c9..a2a5645baa 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -47,6 +47,8 @@ The color of the column is set with the SignColumn highlight group
:highlight SignColumn guibg=darkgrey
<
+If 'cursorline' is enabled, then the CursorLineSign highlight group is used
+|hl-CursorLineSign|.
*sign-identifier*
Each placed sign is identified by a number called the sign identifier. This
identifier is used to jump to the sign or to remove the sign. The identifier
@@ -85,7 +87,7 @@ the delete is undone the sign does not move back.
Here is an example that places a sign "piet", displayed with the text ">>", in
line 23 of the current file: >
:sign define piet text=>> texthl=Search
- :exe ":sign place 2 line=23 name=piet file=" . expand("%:p")
+ :exe ":sign place 2 line=23 name=piet file=" .. expand("%:p")
And here is the command to delete it again: >
:sign unplace 2
@@ -120,8 +122,9 @@ See |sign_define()| for the equivalent Vim script function.
in. Most useful is defining a background color.
numhl={group}
- Highlighting group used for 'number' column at the associated
- line. Overrides |hl-LineNr|, |hl-CursorLineNr|.
+ Highlighting group used for the line number on the line where
+ the sign is placed. Overrides |hl-LineNr|, |hl-LineNrAbove|,
+ |hl-LineNrBelow|, and |hl-CursorLineNr|.
text={text} *E239*
Define the text that is displayed when there is no icon or the
@@ -131,6 +134,10 @@ See |sign_define()| for the equivalent Vim script function.
texthl={group}
Highlighting group used for the text item.
+ culhl={group}
+ Highlighting group used for the text item when the cursor is
+ on the same line as the sign and 'cursorline' is enabled.
+
Example: >
:sign define MySign text=>> texthl=Search linehl=DiffText
<
@@ -377,6 +384,9 @@ sign_define({list})
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
+ culhl highlight group used for the text item when
+ the cursor is on the same line as the sign and
+ 'cursorline' is enabled.
numhl highlight group used for 'number' column at the
associated line. Overrides |hl-LineNr|,
|hl-CursorLineNr|.
@@ -404,6 +414,9 @@ sign_define({list})
\ 'text' : '!!'}
\ ])
<
+ Can also be used as a |method|: >
+ GetSignList()->sign_define()
+
sign_getdefined([{name}]) *sign_getdefined()*
Get a list of defined signs and their attributes.
This is similar to the |:sign-list| command.
@@ -416,14 +429,19 @@ sign_getdefined([{name}]) *sign_getdefined()*
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.
+ sign is placed in; not present if not set.
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
+ texthl highlight group used for the text item; not
+ present if not set.
+ culhl highlight group used for the text item when
+ the cursor is on the same line as the sign and
+ 'cursorline' is enabled; not present if not
+ set.
numhl highlight group used for 'number' column at the
associated line. Overrides |hl-LineNr|,
- |hl-CursorLineNr|.
+ |hl-CursorLineNr|; not present if not set.
Returns an empty List if there are no signs and when {name} is
not found.
@@ -435,6 +453,9 @@ sign_getdefined([{name}]) *sign_getdefined()*
" Get the attribute of the sign named mySign
echo sign_getdefined("mySign")
<
+ Can also be used as a |method|: >
+ GetSignList()->sign_getdefined()
+
sign_getplaced([{buf} [, {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.
@@ -495,6 +516,9 @@ sign_getplaced([{buf} [, {dict}]]) *sign_getplaced()*
" Get a List of all the placed signs
echo sign_getplaced()
<
+ Can also be used as a |method|: >
+ GetBufname()->sign_getplaced()
+<
*sign_jump()*
sign_jump({id}, {group}, {buf})
Open the buffer {buf} or jump to the window that contains
@@ -510,7 +534,9 @@ sign_jump({id}, {group}, {buf})
" Jump to sign 10 in the current buffer
call sign_jump(10, '', '')
<
-
+ Can also be used as a |method|: >
+ GetSignid()->sign_jump()
+<
*sign_place()*
sign_place({id}, {group}, {name}, {buf} [, {dict}])
Place the sign defined as {name} at line {lnum} in file or
@@ -560,7 +586,9 @@ sign_place({id}, {group}, {name}, {buf} [, {dict}])
call sign_place(10, 'g3', 'sign4', 'json.c',
\ {'lnum' : 40, 'priority' : 90})
<
-
+ Can also be used as a |method|: >
+ GetSignid()->sign_place(group, name, expr)
+<
*sign_placelist()*
sign_placelist({list})
Place one or more signs. This is similar to the
@@ -620,6 +648,8 @@ sign_placelist({list})
\ 'lnum' : 50}
\ ])
<
+ Can also be used as a |method|: >
+ GetSignlist()->sign_placelist()
sign_undefine([{name}]) *sign_undefine()*
sign_undefine({list})
@@ -644,6 +674,8 @@ sign_undefine({list})
" Delete all the signs
call sign_undefine()
<
+ Can also be used as a |method|: >
+ GetSignlist()->sign_undefine()
sign_unplace({group} [, {dict}]) *sign_unplace()*
Remove a previously placed sign in one or more buffers. This
@@ -686,6 +718,9 @@ sign_unplace({group} [, {dict}]) *sign_unplace()*
" Remove all the placed signs from all the buffers
call sign_unplace('*')
+
+< Can also be used as a |method|: >
+ GetSigngroup()->sign_unplace()
<
sign_unplacelist({list}) *sign_unplacelist()*
Remove previously placed signs from one or more buffers. This
@@ -715,5 +750,8 @@ sign_unplacelist({list}) *sign_unplacelist()*
\ {'id' : 20, 'buffer' : 'b.vim'},
\ ])
<
+ Can also be used as a |method|: >
+ GetSignlist()->sign_unplacelist()
+<
vim:tw=78:ts=8:noet:ft=help:norl: