aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt48
1 files changed, 29 insertions, 19 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index e6405145cd..5d889983e3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1856,7 +1856,7 @@ v:null Special value used to put "null" in JSON and NIL in msgpack.
v:numbermax Maximum value of a number.
*v:numbermin* *numbermin-variable*
-v:numbermin Minimum value of a number (negative)
+v:numbermin Minimum value of a number (negative).
*v:numbersize* *numbersize-variable*
v:numbersize Number of bits in a Number. This is normally 64, but on some
@@ -2149,7 +2149,7 @@ chanclose({id}[, {stream}]) Number Closes a channel or one of its streams
chansend({id}, {data}) Number Writes {data} to channel
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
charidx({string}, {idx} [, {countcc}])
- Number char index of byte {idx} in {string}
+ Number char index of byte {idx} in {string}
cindent({lnum}) Number C indent for line {lnum}
clearmatches([{win}]) none clear all matches
col({expr}) Number column nr of cursor or mark
@@ -4196,11 +4196,15 @@ foldclosed({lnum}) *foldclosed()*
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the first line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
+ {lnum} is used like with |getline()|. Thus "." is the current
+ line, "'m" mark m, etc.
foldclosedend({lnum}) *foldclosedend()*
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the last line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
+ {lnum} is used like with |getline()|. Thus "." is the current
+ line, "'m" mark m, etc.
foldlevel({lnum}) *foldlevel()*
The result is a Number, which is the foldlevel of line {lnum}
@@ -4211,6 +4215,8 @@ foldlevel({lnum}) *foldlevel()*
returned for lines where folds are still to be updated and the
foldlevel is unknown. As a special case the level of the
previous line is usually available.
+ {lnum} is used like with |getline()|. Thus "." is the current
+ line, "'m" mark m, etc.
*foldtext()*
foldtext() Returns a String, to be displayed for a closed fold. This is
@@ -4862,11 +4868,11 @@ getmarklist([{expr}]) *getmarklist()*
see |bufname()|.
Each item in the returned List is a |Dict| with the following:
- name - name of the mark prefixed by "'"
- pos - a |List| with the position of the mark:
+ mark name of the mark prefixed by "'"
+ pos a |List| with the position of the mark:
[bufnum, lnum, col, off]
- Refer to |getpos()| for more information.
- file - file name
+ Refer to |getpos()| for more information.
+ file file name
Refer to |getpos()| for getting information about a specific
mark.
@@ -4877,6 +4883,8 @@ getmatches([{win}]) *getmatches()*
|getmatches()| is useful in combination with |setmatches()|,
as |setmatches()| can restore a list of matches saved by
|getmatches()|.
+ If {win} is specified, use the window with this number or
+ window ID instead of the current window.
Example: >
:echo getmatches()
< [{'group': 'MyGroup1', 'pattern': 'TODO',
@@ -4945,8 +4953,10 @@ getqflist([{what}]) *getqflist()*
valid |TRUE|: recognized error message
When there is no error list or it's empty, an empty list is
- returned. Quickfix list entries with non-existing buffer
- number are returned with "bufnr" set to zero.
+ returned. Quickfix list entries with a non-existing buffer
+ number are returned with "bufnr" set to zero (Note: some
+ functions accept buffer number zero for the alternate buffer,
+ you may need to explicitly check for zero).
Useful application: Find pattern matches in multiple files and
do something with them: >
@@ -5050,12 +5060,12 @@ getregtype([{regname}]) *getregtype()*
<CTRL-V> is one character with value 0x16.
If {regname} is not specified, |v:register| is used.
-gettabinfo([{arg}]) *gettabinfo()*
- If {arg} is not specified, then information about all the tab
- pages is returned as a |List|. Each List item is a |Dictionary|.
- Otherwise, {arg} specifies the tab page number and information
- about that one is returned. If the tab page does not exist an
- empty List is returned.
+gettabinfo([{tabnr}]) *gettabinfo()*
+ If {tabnr} is not specified, then information about all the
+ tab pages is returned as a |List|. Each List item is a
+ |Dictionary|. Otherwise, {tabnr} specifies the tab page
+ number and information about that one is returned. If the tab
+ page does not exist an empty List is returned.
Each List item is a |Dictionary| with the following entries:
tabnr tab page number.
@@ -5099,11 +5109,11 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
-gettagstack([{nr}]) *gettagstack()*
- The result is a Dict, which is the tag stack of window {nr}.
- {nr} can be the window number or the |window-ID|.
- When {nr} is not specified, the current window is used.
- When window {nr} doesn't exist, an empty Dict is returned.
+gettagstack([{winnr}]) *gettagstack()*
+ The result is a Dict, which is the tag stack of window {winnr}.
+ {winnr} can be the window number or the |window-ID|.
+ When {winnr} is not specified, the current window is used.
+ When window {winnr} doesn't exist, an empty Dict is returned.
The returned dictionary contains the following entries:
curidx Current index in the stack. When at