aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorb-r-o-c-k <brockmammen@gmail.com>2018-04-14 14:17:51 -0500
committerb-r-o-c-k <brockmammen@gmail.com>2018-04-14 14:17:51 -0500
commitad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f (patch)
tree92de2079e80f5f289dd87a54af123cb7d90c3058 /runtime/doc
parent78bc52ea5397c092d01cd08296fe1dc85d998329 (diff)
parentef4feab0e75be19c5f41d70a001db980b72090f5 (diff)
downloadrneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.gz
rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.bz2
rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.zip
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/api.txt100
-rw-r--r--runtime/doc/autocmd.txt27
-rw-r--r--runtime/doc/channel.txt12
-rw-r--r--runtime/doc/deprecated.txt13
-rw-r--r--runtime/doc/develop.txt6
-rw-r--r--runtime/doc/editing.txt12
-rw-r--r--runtime/doc/eval.txt495
-rw-r--r--runtime/doc/filetype.txt6
-rw-r--r--runtime/doc/if_cscop.txt205
-rw-r--r--runtime/doc/indent.txt17
-rw-r--r--runtime/doc/insert.txt13
-rw-r--r--runtime/doc/job_control.txt2
-rw-r--r--runtime/doc/map.txt27
-rw-r--r--runtime/doc/msgpack_rpc.txt7
-rw-r--r--runtime/doc/options.txt87
-rw-r--r--runtime/doc/provider.txt35
-rw-r--r--runtime/doc/quickfix.txt27
-rw-r--r--runtime/doc/quickref.txt2
-rw-r--r--runtime/doc/starting.txt25
-rw-r--r--runtime/doc/syntax.txt14
-rw-r--r--runtime/doc/term.txt9
-rw-r--r--runtime/doc/ui.txt45
-rw-r--r--runtime/doc/various.txt19
-rw-r--r--runtime/doc/vim_diff.txt45
24 files changed, 761 insertions, 489 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index ef8b9c7d47..f828f2cdc1 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -49,6 +49,7 @@ version.api_prerelease Declares the current API level as unstable >
(version.api_prerelease && fn.since == version.api_level)
functions API function signatures
ui_events UI event signatures |ui|
+ui_options Supported |ui-options|
{fn}.since API level where function {fn} was introduced
{fn}.deprecated_since API level where function {fn} was deprecated
types Custom handle types defined by Nvim
@@ -60,8 +61,7 @@ External programs ("clients") can use the metadata to discover the |rpc-api|.
API contract *api-contract*
The API is made of functions and events. Clients call functions like those
-described at |api-global|, and may "attach" in order to receive rich events,
-described at |rpc-remote-ui|.
+described at |api-global|, and may "attach" to receive rich |ui-events|.
As Nvim develops, its API may change only according the following "contract":
@@ -446,7 +446,11 @@ nvim_get_keymap({mode}) *nvim_get_keymap()*
Array of maparg()-like dictionaries describing mappings
nvim_get_api_info() *nvim_get_api_info()*
- TODO: Documentation
+ Returns a 2-tuple (Array), where item 0 is the current channel
+ id and item 1 is the |api-metadata| map (Dictionary).
+
+ Return:~
+ 2-tuple [{channel-id}, {api-metadata}]
Attributes:~
{async}
@@ -477,6 +481,84 @@ nvim_call_atomic({calls}) *nvim_call_atomic()*
error ocurred, the values from all preceding calls will
still be returned.
+ *nvim_parse_expression()*
+nvim_parse_expression({expr}, {flags}, {highlight})
+ Parse a VimL expression
+
+ Attributes:~
+ {async}
+
+ Parameters:~
+ {expr} Expression to parse. Is always treated as a
+ single line.
+ {flags} Flags: - "m" if multiple expressions in a
+ row are allowed (only the first one will be
+ parsed), - "E" if EOC tokens are not allowed
+ (determines whether they will stop parsing
+ process or be recognized as an
+ operator/space, though also yielding an
+ error). - "l" when needing to start parsing
+ with lvalues for ":let" or ":for". Common
+ flag sets: - "m" to parse like for ":echo". -
+ "E" to parse like for "<C-r>=". - empty
+ string for ":call". - "lm" to parse for
+ ":let".
+ {highlight} If true, return value will also include
+ "highlight" key containing array of 4-tuples
+ (arrays) (Integer, Integer, Integer, String),
+ where first three numbers define the
+ highlighted region and represent line,
+ starting column and ending column (latter
+ exclusive: one should highlight region
+ [start_col, end_col)).
+
+ Return:~
+ AST: top-level dictionary with these keys: "error":
+ Dictionary with error, present only if parser saw some
+ error. Contains the following keys: "message": String,
+ error message in printf format, translated. Must contain
+ exactly one "%.*s". "arg": String, error message argument.
+ "len": Amount of bytes successfully parsed. With flags
+ equal to "" that should be equal to the length of expr
+ string. @note: “Sucessfully parsed” here means
+ “participated in AST creation”, not “till the first
+ error”. "ast": AST, either nil or a dictionary with these
+ keys: "type": node type, one of the value names from
+ ExprASTNodeType stringified without "kExprNode" prefix.
+ "start": a pair [line, column] describing where node is
+ “started” where "line" is always 0 (will not be 0 if you
+ will be using nvim_parse_viml() on e.g. ":let", but that
+ is not present yet). Both elements are Integers. "len":
+ “length” of the node. This and "start" are there for
+ debugging purposes primary (debugging parser and providing
+ debug information). "children": a list of nodes described
+ in top/"ast". There always is zero, one or two children,
+ key will not be present if node has no children. Maximum
+ number of children may be found in node_maxchildren array.
+ Local values (present only for certain nodes): "scope": a
+ single Integer, specifies scope for "Option" and
+ "PlainIdentifier" nodes. For "Option" it is one of
+ ExprOptScope values, for "PlainIdentifier" it is one of
+ ExprVarScope values. "ident": identifier (without scope,
+ if any), present for "Option", "PlainIdentifier",
+ "PlainKey" and "Environment" nodes. "name": Integer,
+ register name (one character) or -1. Only present for
+ "Register" nodes. "cmp_type": String, comparison type, one
+ of the value names from ExprComparisonType, stringified
+ without "kExprCmp" prefix. Only present for "Comparison"
+ nodes. "ccs_strategy": String, case comparison strategy,
+ one of the value names from ExprCaseCompareStrategy,
+ stringified without "kCCStrategy" prefix. Only present for
+ "Comparison" nodes. "augmentation": String, augmentation
+ type for "Assignment" nodes. Is either an empty string,
+ "Add", "Subtract" or "Concat" for "=", "+=", "-=" or ".="
+ respectively. "invert": Boolean, true if result of
+ comparison needs to be inverted. Only present for
+ "Comparison" nodes. "ivalue": Integer, integer value for
+ "Integer" nodes. "fvalue": Float, floating-point value for
+ "Float" nodes. "svalue": String, value for
+ "SingleQuotedString" and "DoubleQuotedString" nodes.
+
nvim__id({obj}) *nvim__id()*
Returns object given as argument
@@ -717,9 +799,10 @@ nvim_buf_add_highlight({buffer}, {src_id}, {hl_group}, {line},
or -1 for ungrouped highlight
{hl_group} Name of the highlight group to use
{line} Line to highlight (zero-indexed)
- {col_start} Start of range of columns to highlight
- {col_end} End of range of columns to highlight, or -1
- to highlight to end of line
+ {col_start} Start of (byte-indexed) column range to
+ highlight
+ {col_end} End of (byte-indexed) column range to
+ highlight, or -1 to highlight to end of line
Return:~
The src_id that was used
@@ -953,9 +1036,6 @@ nvim_tabpage_is_valid({tabpage}) *nvim_tabpage_is_valid()*
==============================================================================
UI Functions *api-ui*
-remote_ui_disconnect() *remote_ui_disconnect()*
- TODO: Documentation
-
nvim_ui_attach({width}, {height}, {options}) *nvim_ui_attach()*
TODO: Documentation
@@ -968,4 +1048,4 @@ nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()*
nvim_ui_set_option({name}, {value}) *nvim_ui_set_option()*
TODO: Documentation
- vim:tw=78:ts=8:ft=help:norl: \ No newline at end of file
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 740f44414a..9a04bf2824 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -259,13 +259,12 @@ Name triggered by ~
|BufNew| just after creating a new buffer
|SwapExists| detected an existing swap file
-|TermOpen| when a terminal buffer is starting
-|TermClose| when a terminal buffer ends
+|TermOpen| when a terminal job starts
+|TermClose| when a terminal job ends
Options
|FileType| when the 'filetype' option has been set
|Syntax| when the 'syntax' option has been set
-|TermChanged| after the value of 'term' has changed
|OptionSet| after setting any option
Startup and exit
@@ -933,26 +932,20 @@ TabEnter Just after entering a tab page. |tab-page|
TabLeave Just before leaving a tab page. |tab-page|
A WinLeave event will have been triggered
first.
- {Nvim} *TabNew*
+ *TabNew*
TabNew When creating a new tab page. |tab-page|
After WinEnter and before TabEnter.
- {Nvim} *TabNewEntered*
+ *TabNewEntered*
TabNewEntered After entering a new tab page. |tab-page|
After BufEnter.
- {Nvim} *TabClosed*
+ *TabClosed*
TabClosed After closing a tab page. <afile> can be used
for the tab page number.
- *TermChanged*
-TermChanged After the value of 'term' has changed. Useful
- for re-loading the syntax file to update the
- colors, fonts and other terminal-dependent
- settings. Executed for all loaded buffers.
- {Nvim} *TermClose*
-TermClose When a terminal buffer ends.
- {Nvim} *TermOpen*
-TermOpen When a terminal buffer is starting. This can
- be used to configure the terminal emulator by
- setting buffer variables. |terminal|
+ *TermClose*
+TermClose When a |terminal| job ends.
+ *TermOpen*
+TermOpen When a |terminal| job is starting. Can be
+ used to configure the terminal buffer.
*TermResponse*
TermResponse After the response to |t_RV| is received from
the terminal. The value of |v:termresponse|
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index c94c64eb84..eb2bac6fce 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -4,9 +4,9 @@
NVIM REFERENCE MANUAL by Thiago de Arruda
-Nvim's facilities for async io *channel*
+Nvim asynchronous IO *channel*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *channel-intro*
@@ -43,7 +43,7 @@ bytes. Additionally, for a job channel using rpc, bytes can still be
read over its stderr. Similarily, only bytes can be written to nvim's own stderr.
*channel-callback* *buffered*
- *on_stdout* *on_stderr* *on_stdin* *on_data*
+ *E5210* *on_stdout* *on_stderr* *on_stdin* *on_data*
A callback function `on_{stream}` will be invoked with data read from the
channel. By default, the callback will be invoked immediately when data is
available, to facilitate interactive communication. The same callback will
@@ -52,7 +52,11 @@ Alternatively the `{stream}_buffered` option can be set to invoke the callback
only when the underlying stream reaches EOF, and will then be passed in
complete output. This is helpful when only the complete output is useful, and
not partial data. Futhermore if `{stream}_buffered` is set but not a callback,
-the data is saved in the options dict, with the stream name as key.
+the data is saved in the options dict, with the stream name as key. For this
+to work a new options dict must be used for each opened channel. If a script
+uses a global `s:job_opts` dict, it can be copied with |copy()| before supplying
+it to |jobstart()|. If a dict is reused, so that the dict key already is
+occupied, error `E5210` will be raised.
- The arguments passed to the callback function are:
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 72dfe1230e..03699b3dfb 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -22,6 +22,10 @@ Commands ~
*:wv*
*:wviminfo* Deprecated alias to |:wshada| command.
+Environment Variables ~
+*$NVIM_LISTEN_ADDRESS* Deprecated in favor of |--listen|. If both are given,
+ $NVIM_LISTEN_ADDRESS is ignored.
+
Events ~
*EncodingChanged* Never fired; 'encoding' is always "utf-8".
*FileEncoding* Never fired; equivalent to |EncodingChanged|.
@@ -37,8 +41,8 @@ Functions ~
*file_readable()* Obsolete name for |filereadable()|.
*highlight_exists()* Obsolete name for |hlexists()|.
*highlightID()* Obsolete name for |hlID()|.
-*jobclose()* Obsolete name for |chanclose()|
-*jobsend()* Obsolete name for |chansend()|
+*jobclose()* Obsolete name for |chanclose()|
+*jobsend()* Obsolete name for |chansend()|
*last_buffer_nr()* Obsolete name for bufnr("$").
Modifiers ~
@@ -48,8 +52,11 @@ Modifiers ~
*:map-special* <> notation is always enabled. |cpo-<|
Options ~
+*'cscopeverbose'* Enabled by default. Use |:silent| instead.
+'gd'
+'gdefault' Enables the |:substitute| flag 'g' by default.
*'fe'* 'fenc'+'enc' before Vim 6.0; no longer used.
-*'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed.
+*'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed.
*'langnoremap'* Deprecated alias to 'nolangremap'.
*'vi'*
*'viminfo'* Deprecated alias to 'shada' option.
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 36826e2479..4e77f40035 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -270,9 +270,9 @@ External UIs are expected to implement these common features:
- Send the "super" key (Windows key, Apple key) as a |<D-| chord.
Implementation ~
-- Options can be monitored for changes by the |OptionSet| autocmd. E.g. if the
- user sets the 'guifont' option, this autocmd notifies channel 42: >
- autocmd OptionSet guifont call rpcnotify(42, 'option-changed', 'guifont', &guifont)
+- UI-related options ('guifont', 'ambiwidth', …) are published in the
+ "option_set" |ui-global| event. The event is triggered when the UI first
+ connects to Nvim and whenever an option is changed by the user or a plugin.
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 1b9a1b38fb..5939cb8a8b 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -562,16 +562,16 @@ list of the current window.
buffer.
Also see |++opt| and |+cmd|.
-:[count]arge[dit][!] [++opt] [+cmd] {name} *:arge* *:argedit*
- Add {name} to the argument list and edit it.
+:[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit*
+ Add {name}s to the argument list and edit it.
When {name} already exists in the argument list, this
entry is edited.
This is like using |:argadd| and then |:edit|.
- Note that only one file name is allowed, and spaces
- inside the file name are allowed, like with |:edit|.
+ Spaces in filenames have to be escaped with "\".
[count] is used like with |:argadd|.
- [!] is required if the current file cannot be
- |abandon|ed.
+ If the current file cannot be |abandon|ed {name}s will
+ still be added to the argument list, but won't be
+ edited. No check for duplicates is done.
Also see |++opt| and |+cmd|.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index d2a3a962e6..11c4b62403 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1559,10 +1559,10 @@ v:exception The value of the exception most recently caught and not
< Output: "caught oops".
*v:false* *false-variable*
-v:false Special value used to put "false" in JSON and msgpack. See
- |json_encode()|. This value is converted to "v:false" when used
- as a String (e.g. in |expr5| with string concatenation
- operator) and to zero when used as a Number (e.g. in |expr5|
+v:false Special value used to put "false" in JSON and msgpack. See
+ |json_encode()|. This value is converted to "v:false" when used
+ as a String (e.g. in |expr5| with string concatenation
+ operator) and to zero when used as a Number (e.g. in |expr5|
or |expr7| when used with numeric operators). Read-only.
*v:fcs_reason* *fcs_reason-variable*
@@ -1703,16 +1703,16 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
value is zero when there was no mouse button click.
*v:msgpack_types* *msgpack_types-variable*
-v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()|
- and |msgpackdump()|. All types inside dictionary are fixed
- (not editable) empty lists. To check whether some list is one
+v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()|
+ and |msgpackdump()|. All types inside dictionary are fixed
+ (not editable) empty lists. To check whether some list is one
of msgpack types, use |is| operator.
*v:null* *null-variable*
-v:null Special value used to put "null" in JSON and NIL in msgpack.
- See |json_encode()|. This value is converted to "v:null" when
- used as a String (e.g. in |expr5| with string concatenation
- operator) and to zero when used as a Number (e.g. in |expr5|
+v:null Special value used to put "null" in JSON and NIL in msgpack.
+ See |json_encode()|. This value is converted to "v:null" when
+ used as a String (e.g. in |expr5| with string concatenation
+ operator) and to zero when used as a Number (e.g. in |expr5|
or |expr7| when used with numeric operators). Read-only.
*v:oldfiles* *oldfiles-variable*
@@ -1788,9 +1788,9 @@ v:scrollstart String describing the script or function that caused the
hit-enter prompt.
*v:servername* *servername-variable*
- *$NVIM_LISTEN_ADDRESS*
-v:servername Default Nvim server address. Equivalent to
- |$NVIM_LISTEN_ADDRESS| on startup. |serverstop()|
+v:servername Primary listen-address of the current Nvim instance, the first
+ item returned by |serverlist()|. Can be set by |--listen| or
+ |$NVIM_LISTEN_ADDRESS| at startup. |serverstart()| |serverstop()|
Read-only.
@@ -1903,10 +1903,10 @@ v:throwpoint The point where the exception most recently caught and not
< Output: "Exception from test.vim, line 2"
*v:true* *true-variable*
-v:true Special value used to put "true" in JSON and msgpack. See
- |json_encode()|. This value is converted to "v:true" when used
- as a String (e.g. in |expr5| with string concatenation
- operator) and to one when used as a Number (e.g. in |expr5| or
+v:true Special value used to put "true" in JSON and msgpack. See
+ |json_encode()|. This value is converted to "v:true" when used
+ as a String (e.g. in |expr5| with string concatenation
+ operator) and to one when used as a Number (e.g. in |expr5| or
|expr7| when used with numeric operators). Read-only.
*v:val* *val-variable*
@@ -2492,7 +2492,7 @@ assert_fails({cmd} [, {error}]) *assert_fails()*
assert_false({actual} [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
|v:errors|, like with |assert_equal()|.
- A value is false when it is zero or |v:false|. When "{actual}"
+ A value is false when it is zero or |v:false|. When "{actual}"
is not a number or |v:false| the assert fails.
When {msg} is omitted an error in the form
"Expected False but got {actual}" is produced.
@@ -3182,7 +3182,7 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
A |List| or |Dictionary| is empty when it does not have any
- items. A Number is empty when its value is zero. Special
+ items. A Number is empty when its value is zero. Special
variable is empty when it is |v:false| or |v:null|.
escape({string}, {chars}) *escape()*
@@ -4327,17 +4327,25 @@ getqflist([{what}]) *getqflist()*
If the optional {what} dictionary argument is supplied, then
returns only the items listed in {what} as a dictionary. The
following string items are supported in {what}:
+ context get the context stored with |setqflist()|
+ items quickfix list entries
nr get information for this quickfix list; zero
- means the current quickfix list
+ means the current quickfix list and '$' means
+ the last quickfix list
title get the list title
winid get the |window-ID| (if opened)
all all of the above quickfix properties
Non-string items in {what} are ignored.
If "nr" is not present then the current quickfix list is used.
+ To get the number of lists in the quickfix stack, set 'nr' to
+ '$' in {what}. The 'nr' value in the returned dictionary
+ contains the quickfix stack size.
In case of error processing {what}, an empty dictionary is
returned.
The returned dictionary contains the following entries:
+ context context information stored with |setqflist()|
+ items quickfix list entries
nr quickfix list number
title quickfix list title text
winid quickfix |window-ID| (if opened)
@@ -4749,7 +4757,7 @@ input({opts})
string, or a blank string (for no prompt). A '\n' can be used
in the prompt to start a new line.
- In the second form it accepts a single dictionary with the
+ In the second form it accepts a single dictionary with the
following keys, any of which may be omitted:
Key Default Description ~
@@ -4757,7 +4765,7 @@ input({opts})
default "" Same as {text} in the first form.
completion nothing Same as {completion} in the first form.
cancelreturn "" Same as {cancelreturn} from
- |inputdialog()|. Also works with
+ |inputdialog()|. Also works with
input().
highlight nothing Highlight handler: |Funcref|.
@@ -4833,8 +4841,8 @@ input({opts})
modifier. If the function causes any errors, it will be
skipped for the duration of the current input() call.
- Currently coloring is disabled when command-line contains
- arabic characters.
+ Highlighting is disabled if command-line contains arabic
+ characters.
NOTE: This function must not be used in a startup file, for
the versions that only run in GUI mode (e.g., the Win32 GUI).
@@ -4948,19 +4956,19 @@ islocked({expr}) *islocked()* *E786*
message. Use |exists()| to check for existence.
id({expr}) *id()*
- Returns a |String| which is a unique identifier of the
- container type (|List|, |Dict| and |Partial|). It is
- guaranteed that for the mentioned types `id(v1) ==# id(v2)`
- returns true iff `type(v1) == type(v2) && v1 is v2` (note:
- |v:_null_list| and |v:_null_dict| have the same `id()` with
- different types because they are internally represented as
- a NULL pointers). Currently `id()` returns a hexadecimal
- representanion of the pointers to the containers (i.e. like
- `0x994a40`), same as `printf("%p", {expr})`, but it is advised
+ Returns a |String| which is a unique identifier of the
+ container type (|List|, |Dict| and |Partial|). It is
+ guaranteed that for the mentioned types `id(v1) ==# id(v2)`
+ returns true iff `type(v1) == type(v2) && v1 is v2` (note:
+ |v:_null_list| and |v:_null_dict| have the same `id()` with
+ different types because they are internally represented as
+ a NULL pointers). Currently `id()` returns a hexadecimal
+ representanion of the pointers to the containers (i.e. like
+ `0x994a40`), same as `printf("%p", {expr})`, but it is advised
against counting on exact format of return value.
- It is not guaranteed that `id(no_longer_existing_container)`
- will not be equal to some other `id()`: new containers may
+ It is not guaranteed that `id(no_longer_existing_container)`
+ will not be equal to some other `id()`: new containers may
reuse identifiers of the garbage-collected ones.
items({dict}) *items()*
@@ -5071,14 +5079,14 @@ join({list} [, {sep}]) *join()*
The opposite function is |split()|.
json_decode({expr}) *json_decode()*
- Convert {expr} from JSON object. Accepts |readfile()|-style
- list as the input, as well as regular string. May output any
+ Convert {expr} from JSON object. Accepts |readfile()|-style
+ list as the input, as well as regular string. May output any
Vim value. In the following cases it will output
|msgpack-special-dict|:
1. Dictionary contains duplicate key.
2. Dictionary contains empty key.
- 3. String contains NUL byte. Two special dictionaries: for
- dictionary and for string will be emitted in case string
+ 3. String contains NUL byte. Two special dictionaries: for
+ dictionary and for string will be emitted in case string
with NUL byte was a dictionary key.
Note: function treats its input as UTF-8 always. The JSON
@@ -5087,14 +5095,14 @@ json_decode({expr}) *json_decode()*
Non-UTF-8 characters are an error.
json_encode({expr}) *json_encode()*
- Convert {expr} into a JSON string. Accepts
- |msgpack-special-dict| as the input. Will not convert
- |Funcref|s, mappings with non-string keys (can be created as
- |msgpack-special-dict|), values with self-referencing
- containers, strings which contain non-UTF-8 characters,
- pseudo-UTF-8 strings which contain codepoints reserved for
- surrogate pairs (such strings are not valid UTF-8 strings).
- Non-printable characters are converted into "\u1234" escapes
+ Convert {expr} into a JSON string. Accepts
+ |msgpack-special-dict| as the input. Will not convert
+ |Funcref|s, mappings with non-string keys (can be created as
+ |msgpack-special-dict|), values with self-referencing
+ containers, strings which contain non-UTF-8 characters,
+ pseudo-UTF-8 strings which contain codepoints reserved for
+ surrogate pairs (such strings are not valid UTF-8 strings).
+ Non-printable characters are converted into "\u1234" escapes
or special escapes like "\t", other are dumped as-is.
keys({dict}) *keys()*
@@ -5193,7 +5201,7 @@ line({expr}) The result is a Number, which is the line number of the file
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
:au BufReadPost *
- \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+ \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
@@ -5244,7 +5252,7 @@ log10({expr}) *log10()*
< -2.0
luaeval({expr}[, {expr}])
- Evaluate Lua expression {expr} and return its result converted
+ Evaluate Lua expression {expr} and return its result converted
to Vim data structures. See |lua-luaeval| for more details.
map({expr1}, {expr2}) *map()*
@@ -5493,7 +5501,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
sets buffer line boundaries to redraw screen. It is supposed
to be used when fast match additions and deletions are
required, for example to highlight matching parentheses.
-
+ *E5030* *E5031*
The list {pos} can contain one of these items:
- A number. This whole line will be highlighted. The first
line has number 1.
@@ -5507,6 +5515,10 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
- A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes.
+ Entries with zero and negative line numbers are silently
+ ignored, as well as entries with negative column numbers and
+ lengths.
+
The maximum number of positions is 8.
Example: >
@@ -5675,7 +5687,7 @@ mkdir({name} [, {path} [, {prot}]])
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
- If you try to create an existing directory with {path} set to
+ If you try to create an existing directory with {path} set to
"p" mkdir() will silently exit.
*mode()*
@@ -5728,78 +5740,76 @@ msgpackdump({list}) {Nvim} *msgpackdump()*
5. Points 3. and 4. do not apply to |msgpack-special-dict|s.
msgpackparse({list}) {Nvim} *msgpackparse()*
- Convert a |readfile()|-style list to a list of VimL objects.
+ Convert a |readfile()|-style list to a list of VimL objects.
Example: >
let fname = expand('~/.config/nvim/shada/main.shada')
let mpack = readfile(fname, 'b')
let shada_objects = msgpackparse(mpack)
-< This will read ~/.config/nvim/shada/main.shada file to
+< This will read ~/.config/nvim/shada/main.shada file to
`shada_objects` list.
Limitations:
- 1. Mapping ordering is not preserved unless messagepack
- mapping is dumped using generic mapping
+ 1. Mapping ordering is not preserved unless messagepack
+ mapping is dumped using generic mapping
(|msgpack-special-map|).
- 2. Since the parser aims to preserve all data untouched
- (except for 1.) some strings are parsed to
- |msgpack-special-dict| format which is not convenient to
+ 2. Since the parser aims to preserve all data untouched
+ (except for 1.) some strings are parsed to
+ |msgpack-special-dict| format which is not convenient to
use.
*msgpack-special-dict*
- Some messagepack strings may be parsed to special
+ Some messagepack strings may be parsed to special
dictionaries. Special dictionaries are dictionaries which
1. Contain exactly two keys: `_TYPE` and `_VAL`.
- 2. `_TYPE` key is one of the types found in |v:msgpack_types|
+ 2. `_TYPE` key is one of the types found in |v:msgpack_types|
variable.
- 3. Value for `_VAL` has the following format (Key column
+ 3. Value for `_VAL` has the following format (Key column
contains name of the key from |v:msgpack_types|):
Key Value ~
- nil Zero, ignored when dumping. This value cannot
- possibly appear in |msgpackparse()| output in Neovim
- versions which have |v:null|.
- boolean One or zero. When dumping it is only checked that
- value is a |Number|. This value cannot possibly
- appear in |msgpackparse()| output in Neovim versions
- which have |v:true| and |v:false|.
- integer |List| with four numbers: sign (-1 or 1), highest two
- bits, number with bits from 62nd to 31st, lowest 31
- bits. I.e. to get actual number one will need to use
+ nil Zero, ignored when dumping. Not returned by
+ |msgpackparse()| since |v:null| was introduced.
+ boolean One or zero. When dumping it is only checked that
+ value is a |Number|. Not returned by |msgpackparse()|
+ since |v:true| and |v:false| were introduced.
+ integer |List| with four numbers: sign (-1 or 1), highest two
+ bits, number with bits from 62nd to 31st, lowest 31
+ bits. I.e. to get actual number one will need to use
code like >
_VAL[0] * ((_VAL[1] << 62)
& (_VAL[2] << 31)
& _VAL[3])
-< Special dictionary with this type will appear in
- |msgpackparse()| output under one of the following
+< Special dictionary with this type will appear in
+ |msgpackparse()| output under one of the following
circumstances:
- 1. |Number| is 32-bit and value is either above
+ 1. |Number| is 32-bit and value is either above
INT32_MAX or below INT32_MIN.
- 2. |Number| is 64-bit and value is above INT64_MAX. It
- cannot possibly be below INT64_MIN because msgpack
+ 2. |Number| is 64-bit and value is above INT64_MAX. It
+ cannot possibly be below INT64_MIN because msgpack
C parser does not support such values.
- float |Float|. This value cannot possibly appear in
+ float |Float|. This value cannot possibly appear in
|msgpackparse()| output.
- string |readfile()|-style list of strings. This value will
- appear in |msgpackparse()| output if string contains
- zero byte or if string is a mapping key and mapping is
- being represented as special dictionary for other
+ string |readfile()|-style list of strings. This value will
+ appear in |msgpackparse()| output if string contains
+ zero byte or if string is a mapping key and mapping is
+ being represented as special dictionary for other
reasons.
- binary |readfile()|-style list of strings. This value will
- appear in |msgpackparse()| output if binary string
+ binary |readfile()|-style list of strings. This value will
+ appear in |msgpackparse()| output if binary string
contains zero byte.
- array |List|. This value cannot appear in |msgpackparse()|
+ array |List|. This value cannot appear in |msgpackparse()|
output.
*msgpack-special-map*
- map |List| of |List|s with two items (key and value) each.
- This value will appear in |msgpackparse()| output if
+ map |List| of |List|s with two items (key and value) each.
+ This value will appear in |msgpackparse()| output if
parsed mapping contains one of the following keys:
- 1. Any key that is not a string (including keys which
+ 1. Any key that is not a string (including keys which
are binary strings).
2. String with NUL byte inside.
3. Duplicate key.
4. Empty key.
- ext |List| with two values: first is a signed integer
- representing extension type. Second is
+ ext |List| with two values: first is a signed integer
+ representing extension type. Second is
|readfile()|-style list of strings.
nextnonblank({lnum}) *nextnonblank()*
@@ -6073,11 +6083,11 @@ pumvisible() *pumvisible()*
py3eval({expr}) *py3eval()*
Evaluate Python expression {expr} and return its result
converted to Vim data structures.
- Numbers and strings are returned as they are (strings are
- copied though, Unicode strings are additionally converted to
+ Numbers and strings are returned as they are (strings are
+ copied though, Unicode strings are additionally converted to
UTF-8).
Lists are represented as Vim |List| type.
- Dictionaries are represented as Vim |Dictionary| type with
+ Dictionaries are represented as Vim |Dictionary| type with
keys converted to strings.
{only available when compiled with the |+python3| feature}
@@ -6145,7 +6155,7 @@ readfile({fname} [, {binary} [, {max}]])
reltime([{start} [, {end}]]) *reltime()*
Return an item that represents a time value. The format of
the item depends on the system. It can be passed to
- |reltimestr()| to convert it to a string or |reltimefloat()|
+ |reltimestr()| to convert it to a string or |reltimefloat()|
to convert to a float.
Without an argument it returns the current "relative time", an
@@ -6628,15 +6638,11 @@ server2client({clientid}, {string}) *server2client()*
:echo server2client(expand("<client>"), "HELLO")
<
serverlist() *serverlist()*
- Returns a list of available server names in a list.
- When there are no servers an empty string is returned.
+ Returns a list of server addresses, or empty if all servers
+ were stopped. |serverstart()| |serverstop()|
Example: >
:echo serverlist()
-< {Nvim} *--serverlist*
- The Vim command-line option `--serverlist` was removed from
- Nvim, but it can be imitated: >
- nvim --cmd "echo serverlist()" --cmd "q"
-<
+
serverstart([{address}]) *serverstart()*
Opens a socket or named pipe at {address} and listens for
|RPC| messages. Clients can send |API| commands to the address
@@ -6664,13 +6670,9 @@ serverstart([{address}]) *serverstart()*
< |$NVIM_LISTEN_ADDRESS| is set to {address} if not already set.
- *--servername*
- The Vim command-line option `--servername` can be imitated: >
- nvim --cmd "let g:server_addr = serverstart('foo')"
-<
serverstop({address}) *serverstop()*
- Closes the pipe or socket at {address}. Does nothing if
- {address} is empty or invalid.
+ Closes the pipe or socket at {address}.
+ Returns TRUE if {address} is valid, else FALSE.
If |$NVIM_LISTEN_ADDRESS| is stopped it is unset.
If |v:servername| is stopped it is set to the next available
address returned by |serverlist()|.
@@ -6843,6 +6845,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
nr error number
text description of the error
type single-character error type, 'E', 'W', etc.
+ valid recognized error message
The "col", "vcol", "nr", "type" and "text" entries are
optional. Either "lnum" or "pattern" entry can be used to
@@ -6852,21 +6855,26 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
item will not be handled as an error line.
If both "pattern" and "lnum" are present then "pattern" will
be used.
+ If the "valid" entry is not supplied, then the valid flag is
+ set when "bufnr" is a valid buffer or "filename" exists.
If you supply an empty {list}, the quickfix list will be
cleared.
Note that the list is not exactly the same as what
|getqflist()| returns.
- *E927*
- If {action} is set to 'a', then the items from {list} are
- added to the existing quickfix list. If there is no existing
- list, then a new list is created.
+ {action} values: *E927*
+ 'a' The items from {list} are added to the existing
+ quickfix list. If there is no existing list, then a
+ new list is created.
- If {action} is set to 'r', then the items from the current
- quickfix list are replaced with the items from {list}. This
- can also be used to clear the list: >
- :call setqflist([], 'r')
+ 'r' The items from the current quickfix list are replaced
+ with the items from {list}. This can also be used to
+ clear the list: >
+ :call setqflist([], 'r')
<
+ 'f' All the quickfix lists in the quickfix stack are
+ freed.
+
If {action} is not present or is set to ' ', then a new list
is created.
@@ -6877,7 +6885,12 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
only the items listed in {what} are set. The first {list}
argument is ignored. The following items can be specified in
{what}:
- nr list number in the quickfix stack
+ context any Vim type can be stored as a context
+ items list of quickfix entries. Same as the {list}
+ argument.
+ nr list number in the quickfix stack; zero
+ means the current quickfix list and '$' means
+ the last quickfix list
title quickfix list title text
Unsupported keys in {what} are ignored.
If the "nr" item is not present, then the current quickfix list
@@ -6929,9 +6942,9 @@ setreg({regname}, {value} [, {options}])
:call setreg('a', "1\n2\n3", 'b5')
< This example shows using the functions to save and restore a
- register (note: you may not reliably restore register value
- without using the third argument to |getreg()| as without it
- newlines are represented as newlines AND Nul bytes are
+ register (note: you may not reliably restore register value
+ without using the third argument to |getreg()| as without it
+ newlines are represented as newlines AND Nul bytes are
represented as newlines as well, see |NL-used-for-Nul|). >
:let var_a = getreg('a', 1, 1)
:let var_amode = getregtype('a')
@@ -6982,18 +6995,22 @@ shellescape({string} [, {special}]) *shellescape()*
quotes within {string}.
Otherwise, it will enclose {string} in single quotes and
replace all "'" with "'\''".
+
When the {special} argument is present and it's a non-zero
Number or a non-empty String (|non-zero-arg|), then special
items such as "!", "%", "#" and "<cword>" will be preceded by
a backslash. This backslash will be removed again by the |:!|
command.
+
The "!" character will be escaped (again with a |non-zero-arg|
{special}) when 'shell' contains "csh" in the tail. That is
because for csh and tcsh "!" is used for history replacement
even when inside single quotes.
- The <NL> character is also escaped. With a |non-zero-arg|
- {special} and 'shell' containing "csh" in the tail it's
+
+ With a |non-zero-arg| {special} the <NL> character is also
+ escaped. When 'shell' containing "csh" in the tail it's
escaped a second time.
+
Example of use with a |:!| command: >
:exe '!dir ' . shellescape(expand('<cfile>'), 1)
< This results in a directory listing for the file under the
@@ -7369,20 +7386,20 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
{expr} type result ~
String 'string'
Number 123
- Float 123.123456 or 1.123456e8 or
+ Float 123.123456 or 1.123456e8 or
`str2float('inf')`
Funcref `function('name')`
List [item, item]
Dictionary {key: value, key: value}
Note that in String values the ' character is doubled.
Also see |strtrans()|.
- Note 2: Output format is mostly compatible with YAML, except
- for infinite and NaN floating-point values representations
- which use |str2float()|. Strings are also dumped literally,
- only single quote is escaped, which does not allow using YAML
- for parsing back binary strings. |eval()| should always work for
- strings and floats though and this is the only official
- method, use |msgpackdump()| or |json_encode()| if you need to
+ Note 2: Output format is mostly compatible with YAML, except
+ for infinite and NaN floating-point values representations
+ which use |str2float()|. Strings are also dumped literally,
+ only single quote is escaped, which does not allow using YAML
+ for parsing back binary strings. |eval()| should always work for
+ strings and floats though and this is the only official
+ method, use |msgpackdump()| or |json_encode()| if you need to
share data with other application.
*strlen()*
@@ -7577,17 +7594,29 @@ synIDtrans({synID}) *synIDtrans()*
":highlight link" are followed.
synconcealed({lnum}, {col}) *synconcealed()*
- The result is a List. The first item in the list is 0 if the
- character at the position {lnum} and {col} is not part of a
- concealable region, 1 if it is. The second item in the list is
- a string. If the first item is 1, the second item contains the
- text which will be displayed in place of the concealed text,
- depending on the current setting of 'conceallevel'. The third
- and final item in the list is a unique number representing the
- specific syntax region matched. This allows detection of the
- beginning of a new concealable region if there are two
- consecutive regions with the same replacement character.
- For an example use see $VIMRUNTIME/syntax/2html.vim .
+ The result is a List with currently three items:
+ 1. The first item in the list is 0 if the character at the
+ position {lnum} and {col} is not part of a concealable
+ region, 1 if it is.
+ 2. The second item in the list is a string. If the first item
+ is 1, the second item contains the text which will be
+ displayed in place of the concealed text, depending on the
+ current setting of 'conceallevel' and 'listchars'.
+ 3. The third and final item in the list is a number
+ representing the specific syntax region matched in the
+ line. When the character is not concealed the value is
+ zero. This allows detection of the beginning of a new
+ concealable region if there are two consecutive regions
+ with the same replacement character. For an example, if
+ the text is "123456" and both "23" and "45" are concealed
+ and replace by the character "X", then:
+ call returns ~
+ synconcealed(lnum, 1) [0, '', 0]
+ synconcealed(lnum, 2) [1, 'X', 1]
+ synconcealed(lnum, 3) [1, 'X', 1]
+ synconcealed(lnum, 4) [1, 'X', 2]
+ synconcealed(lnum, 5) [1, 'X', 2]
+ synconcealed(lnum, 6) [0, '', 0]
synstack({lnum}, {col}) *synstack()*
@@ -7620,6 +7649,9 @@ system({cmd} [, {input}]) *system()* *E677*
|writefile()| does with {binary} set to "b" (i.e. with
a newline between each list item, and newlines inside list
items converted to NULs).
+ When {input} is given and is a valid buffer id, the content of
+ the buffer is written to the file line by line, each line
+ terminated by a NL (and NUL where the text has NL).
*E5677*
Note: system() cannot write to or read from backgrounded ("&")
shell commands, e.g.: >
@@ -7630,10 +7662,10 @@ system({cmd} [, {input}]) *system()* *E677*
redirection syntax) before input can reach it. Use
|jobstart()| instead.
- Note: Use |shellescape()| or |::S| with |expand()| or
- |fnamemodify()| to escape special characters in a command
- argument. Newlines in {cmd} may cause the command to fail.
- The characters in 'shellquote' and 'shellxquote' may also
+ Note: Use |shellescape()| or |::S| with |expand()| or
+ |fnamemodify()| to escape special characters in a command
+ argument. Newlines in {cmd} may cause the command to fail.
+ The characters in 'shellquote' and 'shellxquote' may also
cause trouble.
The result is a String. Example: >
@@ -7660,9 +7692,9 @@ system({cmd} [, {input}]) *system()* *E677*
systemlist({cmd} [, {input} [, {keepempty}]]) *systemlist()*
- Same as |system()|, but returns a |List| with lines (parts of
- output separated by NL) with NULs transformed into NLs. Output
- is the same as |readfile()| will output with {binary} argument
+ Same as |system()|, but returns a |List| with lines (parts of
+ output separated by NL) with NULs transformed into NLs. Output
+ is the same as |readfile()| will output with {binary} argument
set to "b", except that a final newline is not preserved,
unless {keepempty} is non-zero.
Note that on MS-Windows you may get trailing CR characters.
@@ -7926,7 +7958,7 @@ type({expr}) *type()*
:if type(myvar) == type({})
:if type(myvar) == type(0.0)
:if type(myvar) == type(v:true)
-< In place of checking for |v:null| type it is better to check
+< In place of checking for |v:null| type it is better to check
for |v:null| directly as it is the only value of this type: >
:if myvar is v:null
< To check if the v:t_ variables exist use this: >
@@ -8243,10 +8275,10 @@ writefile({list}, {fname} [, {flags}])
:call writefile(["foo"], "event.log", "a")
:call writefile(["bar"], "event.log", "a")
<
- When {flags} contains "S" fsync() call is not used, with "s"
- it is used, 'fsync' option applies by default. No fsync()
- means that writefile() will finish faster, but writes may be
- left in OS buffers and not yet written to disk. Such changes
+ When {flags} contains "S" fsync() call is not used, with "s"
+ it is used, 'fsync' option applies by default. No fsync()
+ means that writefile() will finish faster, but writes may be
+ left in OS buffers and not yet written to disk. Such changes
will disappear if system crashes before OS does writing.
All NL characters are replaced with a NUL character.
@@ -8414,6 +8446,7 @@ win32 Windows version of Vim (32 or 64 bit).
winaltkeys Compiled with 'winaltkeys' option.
windows Compiled with support for more than one window.
writebackup Compiled with 'writebackup' default on.
+wsl WSL (Windows Subsystem for Linux) version of Vim.
*string-match*
Matching a pattern in a String
@@ -8728,7 +8761,7 @@ like this: >
When such a function is called, and it is not defined yet, Vim will search the
"autoload" directories in 'runtimepath' for a script file called
-"filename.vim". For example "~/.config/nvim/autoload/filename.vim". That
+"filename.vim". For example "~/.config/nvim/autoload/filename.vim". That
file should then define the function like this: >
function filename#funcname()
@@ -8889,11 +8922,6 @@ This does NOT work: >
value and the global value are changed.
Example: >
:let &path = &path . ',/usr/local/include'
-< This also works for terminal codes in the form t_xx.
- But only for alphanumerical names. Example: >
- :let &t_k1 = "\<Esc>[234;"
-< When the code does not exist yet it will be created as
- a terminal key code, there is no error.
:let &{option-name} .= {expr1}
For a string option: Append {expr1} to the value.
@@ -9004,8 +9032,8 @@ This does NOT work: >
< *E741* *E940*
If you try to change a locked variable you get an
error message: "E741: Value is locked: {name}".
- If you try to lock or unlock a built-in variable you
- will get an error message "E940: Cannot lock or unlock
+ If you try to lock or unlock a built-in variable you
+ will get an error message "E940: Cannot lock or unlock
variable {name}".
[depth] is relevant when locking a |List| or
@@ -9264,17 +9292,17 @@ This does NOT work: >
with the |:redraw| command. Example: >
:new | redraw | echo "there is a new window"
< *:echo-self-refer*
- When printing nested containers echo prints second
- occurrence of the self-referencing container using
- "[...@level]" (self-referencing |List|) or
+ When printing nested containers echo prints second
+ occurrence of the self-referencing container using
+ "[...@level]" (self-referencing |List|) or
"{...@level}" (self-referencing |Dict|): >
:let l = []
:call add(l, l)
:let l2 = []
:call add(l2, [l2])
:echo l l2
-< echoes "[[...@0]] [[[...@0]]]". Echoing "[l]" will
- echo "[[[...@1]]]" because l first occurs at second
+< echoes "[[...@0]] [[[...@0]]]". Echoing "[l]" will
+ echo "[[[...@1]]]" because l first occurs at second
level.
*:echon*
@@ -10505,18 +10533,19 @@ missing: >
To execute a command only when the |+eval| feature is disabled requires a trick,
as this example shows: >
- if 1
- nnoremap : :"
- endif
- normal :set history=111<CR>
- if 1
- nunmap :
- endif
+
+ silent! while 0
+ set history=111
+ silent! endwhile
+
+When the |+eval| feature is available the command is skipped because of the
+"while 0". Without the |+eval| feature the "while 0" is an error, which is
+silently ignored, and the command is executed.
The "<CR>" here is a real CR character, type CTRL-V Enter to get it.
When the |+eval| feature is available the ":" is remapped to add a double
-quote, which has the effect of commenting-out the command. without the
+quote, which has the effect of commenting-out the command. Without the
|+eval| feature the nnoremap command is skipped and the command is executed.
==============================================================================
@@ -10563,7 +10592,7 @@ option will still be marked as it was set in the sandbox.
In a few situations it is not allowed to change the text in the buffer, jump
to another window and some other things that might confuse or break what Vim
is currently doing. This mostly applies to things that happen when Vim is
-actually doing something else. For example, evaluating the 'balloonexpr' may
+actually doing something else. For example, evaluating the 'balloonexpr' may
happen any moment the mouse cursor is resting at some position.
This is not allowed when the textlock is active:
@@ -10573,5 +10602,123 @@ This is not allowed when the textlock is active:
- closing a window or quitting Vim
- etc.
+==============================================================================
+13. Command-line expressions highlighting *expr-highlight*
+
+Expressions entered by the user in |i_CTRL-R_=|, |c_CTRL-\_e|, |quote=| are
+highlighted by the built-in expressions parser. It uses highlight groups
+described in the table below, which may be overriden by colorschemes.
+ *hl-NvimInvalid*
+Besides the "Nvim"-prefixed highlight groups described below, there are
+"NvimInvalid"-prefixed highlight groups which have the same meaning but
+indicate that the token contains an error or that an error occurred just
+before it. They have mostly the same hierarchy, except that (by default) in
+place of any non-Nvim-prefixed group NvimInvalid linking to `Error` is used
+and some other intermediate groups are present.
+
+Group Default link Colored expression ~
+*hl-NvimInternalError* None, red/red Parser bug
+
+*hl-NvimAssignment* Operator Generic assignment
+*hl-NvimPlainAssignment* NvimAssignment `=` in |:let|
+*hl-NvimAugmentedAssignment* NvimAssignment Generic, `+=`/`-=`/`.=`
+*hl-NvimAssignmentWithAddition* NvimAugmentedAssignment `+=` in |:let+=|
+*hl-NvimAssignmentWithSubtraction* NvimAugmentedAssignment `-=` in |:let-=|
+*hl-NvimAssignmentWithConcatenation* NvimAugmentedAssignment `.=` in |:let.=|
+
+*hl-NvimOperator* Operator Generic operator
+
+*hl-NvimUnaryOperator* NvimOperator Generic unary op
+*hl-NvimUnaryPlus* NvimUnaryOperator |expr-unary-+|
+*hl-NvimUnaryMinus* NvimUnaryOperator |expr-unary--|
+*hl-NvimNot* NvimUnaryOperator |expr-!|
+
+*hl-NvimBinaryOperator* NvimOperator Generic binary op
+*hl-NvimComparison* NvimBinaryOperator Any |expr4| operator
+*hl-NvimComparisonModifier* NvimComparison `#`/`?` near |expr4| op
+*hl-NvimBinaryPlus* NvimBinaryOperator |expr-+|
+*hl-NvimBinaryMinus* NvimBinaryOperator |expr--|
+*hl-NvimConcat* NvimBinaryOperator |expr-.|
+*hl-NvimConcatOrSubscript* NvimConcat |expr-.| or |expr-entry|
+*hl-NvimOr* NvimBinaryOperator |expr-barbar|
+*hl-NvimAnd* NvimBinaryOperator |expr-&&|
+*hl-NvimMultiplication* NvimBinaryOperator |expr-star|
+*hl-NvimDivision* NvimBinaryOperator |expr-/|
+*hl-NvimMod* NvimBinaryOperator |expr-%|
+
+*hl-NvimTernary* NvimOperator `?` in |expr1|
+*hl-NvimTernaryColon* NvimTernary `:` in |expr1|
+
+*hl-NvimParenthesis* Delimiter Generic bracket
+*hl-NvimLambda* NvimParenthesis `{`/`}` in |lambda|
+*hl-NvimNestingParenthesis* NvimParenthesis `(`/`)` in |expr-nesting|
+*hl-NvimCallingParenthesis* NvimParenthesis `(`/`)` in |expr-function|
+
+*hl-NvimSubscript* NvimParenthesis Generic subscript
+*hl-NvimSubscriptBracket* NvimSubscript `[`/`]` in |expr-[]|
+*hl-NvimSubscriptColon* NvimSubscript `:` in |expr-[:]|
+*hl-NvimCurly* NvimSubscript `{`/`}` in
+ |curly-braces-names|
+
+*hl-NvimContainer* NvimParenthesis Generic container
+*hl-NvimDict* NvimContainer `{`/`}` in |dict| literal
+*hl-NvimList* NvimContainer `[`/`]` in |list| literal
+
+*hl-NvimIdentifier* Identifier Generic identifier
+*hl-NvimIdentifierScope* NvimIdentifier Namespace: letter
+ before `:` in
+ |internal-variables|
+*hl-NvimIdentifierScopeDelimiter* NvimIdentifier `:` after namespace
+ letter
+*hl-NvimIdentifierName* NvimIdentifier Rest of the ident
+*hl-NvimIdentifierKey* NvimIdentifier Identifier after
+ |expr-entry|
+
+*hl-NvimColon* Delimiter `:` in |dict| literal
+*hl-NvimComma* Delimiter `,` in |dict|/|list|
+ literal or
+ |expr-function|
+*hl-NvimArrow* Delimiter `->` in |lambda|
+
+*hl-NvimRegister* SpecialChar |expr-register|
+*hl-NvimNumber* Number Non-prefix digits
+ in integer
+ |expr-number|
+*hl-NvimNumberPrefix* Type `0` for |octal-number|
+ `0x` for |hex-number|
+ `0b` for |binary-number|
+*hl-NvimFloat* NvimNumber Floating-point
+ number
+
+*hl-NvimOptionSigil* Type `&` in |expr-option|
+*hl-NvimOptionScope* NvimIdentifierScope Option scope if any
+*hl-NvimOptionScopeDelimiter* NvimIdentifierScopeDelimiter
+ `:` after option scope
+*hl-NvimOptionName* NvimIdentifier Option name
+
+*hl-NvimEnvironmentSigil* NvimOptionSigil `$` in |expr-env|
+*hl-NvimEnvironmentName* NvimIdentifier Env variable name
+
+*hl-NvimString* String Generic string
+*hl-NvimStringBody* NvimString Generic string
+ literal body
+*hl-NvimStringQuote* NvimString Generic string quote
+*hl-NvimStringSpecial* SpecialChar Generic string
+ non-literal body
+
+*hl-NvimSingleQuote* NvimStringQuote `'` in |expr-'|
+*hl-NvimSingleQuotedBody* NvimStringBody Literal part of
+ |expr-'| string body
+*hl-NvimSingleQuotedQuote* NvimStringSpecial `''` inside |expr-'|
+ string body
+
+*hl-NvimDoubleQuote* NvimStringQuote `"` in |expr-quote|
+*hl-NvimDoubleQuotedBody* NvimStringBody Literal part of
+ |expr-quote| body
+*hl-NvimDoubleQuotedEscape* NvimStringSpecial Valid |expr-quote|
+ escape sequence
+*hl-NvimDoubleQuotedUnknownEscape* NvimInvalidValue Unrecognized
+ |expr-quote| escape
+ sequence
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 78402b47fe..74c453f79a 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -24,10 +24,8 @@ Each time a new or existing file is edited, Vim will try to recognize the type
of the file and set the 'filetype' option. This will trigger the FileType
event, which can be used to set the syntax highlighting, set options, etc.
-Detail: The ":filetype on" command will load one of these files:
- Mac $VIMRUNTIME/filetype.vim
- MS-DOS $VIMRUNTIME\filetype.vim
- Unix $VIMRUNTIME/filetype.vim
+Detail: The ":filetype on" command will load this file:
+ $VIMRUNTIME/filetype.vim
This file is a Vim script that defines autocommands for the
BufNewFile and BufRead events. If the file type is not found by the
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index ac3d7a9ed8..451d525ea8 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -4,42 +4,19 @@
VIM REFERENCE MANUAL by Andy Kahn
*cscope* *Cscope*
-This document explains how to use Vim's cscope interface.
+Cscope is a "code intelligence" tool that helps you navigate C programs. It
+can also perform some refactoring tasks, such as renaming a global variable in
+all source files. Think of it as "ctags on steroids".
-Cscope is a tool like ctags, but think of it as ctags on steroids since it
-does a lot more than what ctags provides. In Vim, jumping to a result from
-a cscope query is just like jumping to any tag; it is saved on the tag stack
-so that with the right keyboard mappings, you can jump back and forth between
-functions as you normally would with |tags|.
+See |cscope-usage| for a quickstart.
Type |gO| to see the table of contents.
==============================================================================
-1. Cscope introduction *cscope-intro*
+Cscope introduction *cscope-intro*
-The following text is taken from a version of the cscope man page:
- -----
-
- Cscope is an interactive screen-oriented tool that helps you:
-
- Learn how a C program works without endless flipping through a thick
- listing.
-
- Locate the section of code to change to fix a bug without having to
- learn the entire program.
-
- Examine the effect of a proposed change such as adding a value to an
- enum variable.
-
- Verify that a change has been made in all source files such as adding
- an argument to an existing function.
-
- Rename a global variable in all source files.
-
- Change a constant to a preprocessor symbol in selected lines of files.
-
- It is designed to answer questions like:
+Cscope is designed to answer questions like:
Where is this symbol used?
Where is it defined?
Where did this variable get its value?
@@ -51,35 +28,17 @@ The following text is taken from a version of the cscope man page:
Where is this source file in the directory structure?
What files include this header file?
- Cscope answers these questions from a symbol database that it builds the
- first time it is used on the source files. On a subsequent call, cscope
- rebuilds the database only if a source file has changed or the list of
- source files is different. When the database is rebuilt the data for the
- unchanged files is copied from the old database, which makes rebuilding
- much faster than the initial build.
-
- -----
-
-When cscope is normally invoked, you will get a full-screen selection
-screen allowing you to make a query for one of the above questions.
-However, once a match is found to your query and you have entered your
-text editor to edit the source file containing match, you cannot simply
-jump from tag to tag as you normally would with vi's Ctrl-] or :tag
-command.
-
-Vim's cscope interface is done by invoking cscope with its line-oriented
-interface, and then parsing the output returned from a query. The end
-result is that cscope query results become just like regular tags, so
-you can jump to them just like you do with normal tags (Ctrl-] or :tag)
-and then go back by popping off the tagstack with Ctrl-T. (Please note
-however, that you don't actually jump to a cscope tag simply by doing
-Ctrl-] or :tag without remapping these commands or setting an option.
-See the remaining sections on how the cscope interface works and for
-suggested use.)
+Cscope answers these questions from a symbol database that it builds the first
+time it is used on the source files. On a subsequent call, cscope rebuilds
+the database only if a source file has changed or the list of source files is
+different. When the database is rebuilt the data for the unchanged files is
+copied from the old database, which makes rebuilding much faster than the
+initial build.
+See |cscope-usage| to get started.
==============================================================================
-2. Cscope related commands *cscope-commands*
+Cscope commands *cscope-commands*
*:cscope* *:cs* *:scs* *:scscope* *E259* *E262* *E561* *E560*
All cscope commands are accessed through suboptions to the cscope commands.
@@ -232,7 +191,7 @@ through your tags file(s).
==============================================================================
-3. Cscope options *cscope-options*
+Cscope options *cscope-options*
Use the |:set| command to set all cscope options. Ideally, you would do
this in one of your startup files (e.g., vimrc). Some cscope related
@@ -245,7 +204,6 @@ started will have no effect!
:set csprg=/usr/local/bin/cscope
<
*cscopequickfix* *csqf* *E469*
-{not available when compiled without the |+quickfix| feature}
'cscopequickfix' specifies whether to use quickfix window to show cscope
results. This is a list of comma-separated values. Each item consists of
|cscope-find| command (s, g, d, c, t, e, f, i or a) and flag (+, - or 0).
@@ -260,81 +218,56 @@ seems to be useful: >
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
will always use |:cstag| instead of the default :tag behavior. Effectively,
by setting 'cst', you will always search your cscope databases as well as
-your tag files. The default is off. Examples: >
- :set cst
- :set nocst
-<
+your tag files. The default is off.
+
*cscoperelative* *csre*
If 'cscoperelative' is set, then in absence of a prefix given to cscope
(prefix is the argument of -P option of cscope), basename of cscope.out
location (usually the project root directory) will be used as the prefix
to construct an absolute path. The default is off. Note: This option is
only effective when cscope (cscopeprg) is initialized without a prefix
-path (-P). Examples: >
- :set csre
- :set nocsre
-<
+path (-P).
+
*cscopetagorder* *csto*
The value of 'csto' determines the order in which |:cstag| performs a search.
If 'csto' is set to zero, cscope database(s) are searched first, followed
by tag file(s) if cscope did not return any matches. If 'csto' is set to
one, tag file(s) are searched before cscope database(s). The default is zero.
-Examples: >
- :set csto=0
- :set csto=1
-<
- *cscopeverbose* *csverb*
-If 'cscopeverbose' is not set (the default), messages will not be printed
-indicating success or failure when adding a cscope database. Ideally, you
-should reset this option in your |init.vim| before adding any cscope
-databases, and after adding them, set it. From then on, when you add more
-databases within Vim, you will get a (hopefully) useful message should the
-database fail to be added. Examples: >
- :set csverb
- :set nocsverb
-<
+
*cscopepathcomp* *cspc*
-The value of 'cspc' determines how many components of a file's path to
-display. With the default value of zero the entire path will be displayed.
+'cscopepathcomp' determines how many components of a file's path to display.
+With the default value of zero the entire path will be displayed.
The value one will display only the filename with no path. Other values
display that many components. For example: >
- :set cspc=3
+ :set cscopepathcomp=3
will display the last 3 components of the file's path, including the file
name itself.
==============================================================================
-4. How to use cscope in Vim *cscope-howtouse*
+Using cscope in Nvim *cscope-usage* *cscope-howtouse*
-The first thing you need to do is to build a cscope database for your
-source files. For the most basic case, simply do "cscope -b". Please
-refer to the cscope man page for more details.
+To get started, build the cscope database in your project root directory: >
+ cscope -bcqR
-Assuming you have a cscope database, you need to "add" the database to Vim.
-This establishes a cscope "connection" and makes it available for Vim to use.
-You can do this in your vimrc file, or you can do it manually after starting
-vim. For example, to add the cscope database "cscope.out", you would do:
+See the cscope manpage for details: >
+ :Man cscope
- :cs add cscope.out
+By default the cscope database file is named "cscope.out". After building the
+database, connect to it from Nvim: >
+ :cscope add cscope.out
-You can double-check the result of this by executing ":cs show". This will
-produce output which looks like this:
+That establishes a cscope connection for Nvim to use. You can check the
+result with ":cs show". It will show something like:
# pid database name prepend path
0 28806 cscope.out <none>
-Note:
-Because of the Microsoft RTL limitations, Win32 version shows 0 instead
-of the real pid.
-
Once a cscope connection is established, you can make queries to cscope and
-the results will be printed to you. Queries are made using the command
-":cs find". For example:
-
+the results will be printed. Queries are made using the command ":cs find".
+For example: >
:cs find g ALIGN_SIZE
-This can get a little cumbersome since one ends up doing a significant
-amount of typing. Fortunately, there are ways around this by mapping
-shortcut keys. See |cscope-suggestions| for suggested usage.
+To make this easier you can configure mappings, see |cscope-suggestions|.
If the results return only one match, you will automatically be taken to it.
If there is more than one match, you will be given a selection screen to pick
@@ -343,39 +276,28 @@ simply hit Ctrl-T to get back to the previous one.
==============================================================================
-5. Limitations *cscope-limitations*
-
-Cscope support for Vim is only available on systems that support these four
-system calls: fork(), pipe(), execl(), waitpid(). This means it is mostly
-limited to Unix systems.
-
-Additionally Cscope support works for Win32. For more information and a
-cscope version for Win32 see:
-
- http://iamphet.nm.ru/cscope/index.html
+Limitations *cscope-limitations*
Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
is not configurable (e.g., you can't do a tselect instead).
+
==============================================================================
-6. Suggested usage *cscope-suggestions*
+Sample config *cscope-suggestions*
-Put these entries in your vimrc (adjust the pathname accordingly to your
-setup): >
+Copy this into your init.vim (adjust paths for your system): >
if has("cscope")
set csprg=/usr/local/bin/cscope
set csto=0
set cst
- set nocsverb
" add any database in current directory
if filereadable("cscope.out")
- cs add cscope.out
+ silent cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
- cs add $CSCOPE_DB
+ silent cs add $CSCOPE_DB
endif
- set csverb
endif
By setting 'cscopetag', we have effectively replaced all instances of the :tag
@@ -447,47 +369,6 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>a
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
-
-==============================================================================
-7. Cscope availability and information *cscope-info*
-
-If you do not already have cscope (it did not come with your compiler
-license or OS distribution), then you can download it for free from:
- http://cscope.sourceforge.net/
-This is released by SCO under the BSD license.
-
-If you want a newer version of cscope, you will probably have to buy it.
-According to the (old) nvi documentation:
-
- You can buy version 13.3 source with an unrestricted license
- for $400 from AT&T Software Solutions by calling +1-800-462-8146.
-
-Also you can download cscope 13.x and mlcscope 14.x (multi-lingual cscope
-which supports C, C++, Java, lex, yacc, breakpoint listing, Ingres, and SDL)
-from World-Wide Exptools Open Source packages page:
- http://www.bell-labs.com/project/wwexptools/packages.html
-
-In Solaris 2.x, if you have the C compiler license, you will also have
-cscope. Both are usually located under /opt/SUNWspro/bin
-
-SGI developers can also get it. Search for Cscope on this page:
- http://freeware.sgi.com/index-by-alpha.html
- https://toolbox.sgi.com/toolbox/utilities/cscope/
-The second one is for those who have a password for the SGI toolbox.
-
-There is source to an older version of a cscope clone (called "cs") available
-on the net. Due to various reasons, this is not supported with Vim.
-
-The cscope interface/support for Vim was originally written by
-Andy Kahn <ackahn@netapp.com>. The original structure (as well as a tiny
-bit of code) was adapted from the cscope interface in nvi. Please report
-any problems, suggestions, patches, et al., you have for the usage of
-cscope within Vim to him.
- *cscope-win32*
-For a cscope version for Win32 see:
- http://code.google.com/p/cscope-win32/
-
-Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
-him if you have Win32-specific issues.
+<
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index cf45ec4f38..7ba5a373dc 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -321,6 +321,21 @@ The examples below assume a 'shiftwidth' of 4.
void function(); void function();
} }
<
+ *cino-E*
+ EN Indent inside C++ linkage specifications (extern "C" or
+ extern "C++") N characters extra compared to a normal block.
+ (default 0).
+
+ cino= cino=E-s >
+ extern "C" { extern "C" {
+ void function(); void function();
+ } }
+
+ extern "C" extern "C"
+ { {
+ void function(); void function();
+ } }
+<
*cino-p*
pN Parameter declarations for K&R-style function declarations will
be indented N characters from the margin. (default
@@ -550,7 +565,7 @@ The examples below assume a 'shiftwidth' of 4.
The defaults, spelled out in full, are:
- cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
+ cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,E0,ps,ts,is,+s,
c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
Vim puts a line in column 1 if:
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index b6cc18ab1b..1feff0723b 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -40,10 +40,11 @@ char action ~
*i_CTRL-[* *i_<Esc>*
<Esc> or CTRL-[ End insert or Replace mode, go back to Normal mode. Finish
abbreviation.
- Note: If your <Esc> key is hard to hit on your keyboard, train
- yourself to use CTRL-[.
- If Esc doesn't work and you are using a Mac, try CTRL-Esc.
- Or disable Listening under Accessibility preferences.
+ Note: If your <Esc> key is hard to hit, try CTRL-[ instead.
+ *i_META* *i_ALT*
+ |ALT| (|META|) acts like <Esc> if the chord is not mapped.
+ For example <A-x> acts like <Esc>x if <A-x> does not have an
+ insert-mode mapping.
*i_CTRL-C*
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
abbreviations. Does not trigger the |InsertLeave| autocommand
@@ -1077,6 +1078,8 @@ items:
item with the same word is already present.
empty when non-zero this match will be added even when it is
an empty string
+ user_data custom data which is associated with the item and
+ available in |v:completed_item|
All of these except "icase", "dup" and "empty" must be a string. If an item
does not meet these requirements then an error message is given and further
@@ -1170,6 +1173,8 @@ The menu is used when:
The 'pumheight' option can be used to set a maximum height. The default is to
use all space available.
+The 'pumwidth' option can be used to set a minimum width. The default is 15
+characters.
There are three states:
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P.
diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt
index e57015db22..ed5f16902a 100644
--- a/runtime/doc/job_control.txt
+++ b/runtime/doc/job_control.txt
@@ -58,7 +58,7 @@ Description of what happens:
- The first shell is idle, waiting to read commands from its stdin.
- The second shell is started with -c which executes the command (a for-loop
printing 0 through 9) and then exits.
- - `JobHandler()` callback is passed to |jobstart()| to handle various job
+ - `OnEvent()` callback is passed to |jobstart()| to handle various job
events. It displays stdout/stderr data received from the shells.
For |on_stdout| and |on_stderr| see |channel-callback|.
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 9b61fa6527..038e90fab0 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -232,8 +232,10 @@ For this reason the following is blocked:
- Editing another buffer.
- The |:normal| command.
- Moving the cursor is allowed, but it is restored afterwards.
+- If the cmdline is changed, the old text and cursor position are restored.
If you want the mapping to do any of these let the returned characters do
-that.
+that. Alternatively use a |<Cmd>| mapping which doesn't have these
+restrictions.
You can use getchar(), it consumes typeahead if there is any. E.g., if you
have these mappings: >
@@ -272,6 +274,29 @@ again for using <expr>. This does work: >
Using 0x80 as a single byte before other text does not work, it will be seen
as a special key.
+ *<Cmd>* *:map-command*
+A command mapping is a mapping that directly executes a command. Command
+mappings are written by placing a command in between <Cmd> and <CR> in the
+rhs of a mapping (in any mode): >
+ noremap <f3> <Cmd>echo mode(1)<cr>
+<
+ *E5520*
+The command must be complete and ended with a <CR>. If the command is
+incomplete, an error is raised. |Command-line| mode is never entered.
+
+This is more flexible than using `:<c-u>` in visual and operator pending
+mode, or `<c-o>:` in insert mode, as the commands are exectued directly in the
+mode, and not normal mode. Also visual mode is not aborted. Commands can be
+invoked directly in cmdline mode, which is not simple otherwise (a timer has
+to be used). Unlike <expr> mappings, there are not any specific restrictions
+what the command can do, except for what is normally possible to do in every
+specific mode. The command should be executed the same way as if an
+(unrestricted) |autocmd| was invoked or an async event event was processed.
+
+Note: In select mode, |:map| or |:vmap| command mappings will be executed in
+visual mode. If a mapping is intended to work in select mode, it is
+recomendend to map it using |:smap|, possibly in addition to the same mapping
+with |:map| or |:xmap|.
1.3 MAPPING AND MODES *:map-modes*
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o* *mapmode-t*
diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt
index 2d8f5af6d2..01d4e10cea 100644
--- a/runtime/doc/msgpack_rpc.txt
+++ b/runtime/doc/msgpack_rpc.txt
@@ -70,9 +70,8 @@ An rpc socket is automatically created with each instance. The socket
location is stored in |v:servername|. By default this is a named pipe
with an automatically generated address. See |XXX|.
-To make Nvim listen on a TCP/IP socket instead, set the
- |$NVIM_LISTEN_ADDRESS| environment variable before starting Nvim: >
- NVIM_LISTEN_ADDRESS=127.0.0.1:6666 nvim
+To make Nvim listen on a TCP/IP socket instead, specify |--listen|: >
+ nvim --listen 127.0.0.1:6666
<Also, more sockets and named pipes can be listened on using |serverstart()|.
Note that localhost TCP sockets are generally less secure than named pipes,
@@ -242,4 +241,4 @@ Even for statically compiled clients it is good practice to avoid hardcoding
the type codes, because a client may be built against one Nvim version but
connect to another with different type codes.
-
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 4fe2e07909..0b7c61ea18 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1807,12 +1807,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Determines the order in which ":cstag" performs a search. See
|cscopetagorder|.
- *'cscopeverbose'* *'csverb'*
- *'nocscopeverbose'* *'nocsverb'*
-'cscopeverbose' 'csverb' boolean (default off)
- global
- Give messages when adding a cscope database. See |cscopeverbose|.
-
*'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'*
'cursorbind' 'crb' boolean (default off)
local to window
@@ -2042,6 +2036,11 @@ A jump table for the options with a short description can be found at |Q_op|.
column of the last screen line. Overrules "lastline".
uhex Show unprintable characters hexadecimal as <xx>
instead of using ^C and ~C.
+ msgsep When showing messages longer than 'cmdheight' lines,
+ only scroll the message lines and not the entire
+ screen. This also shows a separator line filled with
+ chars determined by 'fillchars' option, and
+ highlighted with the |MsgSeparator| group.
When neither "lastline" nor "truncate" is included, a last line that
doesn't fit is replaced with "@" lines.
@@ -2383,7 +2382,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'fillchars'* *'fcs'*
-'fillchars' 'fcs' string (default "vert:|,fold:-")
+'fillchars' 'fcs' string (default "")
global
{not available when compiled without the |+windows|
and |+folding| features}
@@ -2393,16 +2392,20 @@ A jump table for the options with a short description can be found at |Q_op|.
item default Used for ~
stl:c ' ' or '^' statusline of the current window
stlnc:c ' ' or '=' statusline of the non-current windows
- vert:c '|' vertical separators |:vsplit|
- fold:c '-' filling 'foldtext'
+ vert:c '│' or '|' vertical separators |:vsplit|
+ fold:c '·' or '-' filling 'foldtext'
diff:c '-' deleted lines of the 'diff' option
+ msgsep:c ' ' message separator 'display'
Any one that is omitted will fall back to the default. For "stl" and
"stlnc" the space will be used when there is highlighting, '^' or '='
otherwise.
+ If 'ambiwidth' is "double" then "vert" and "fold" default to
+ single-byte alternatives.
+
Example: >
- :set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
+ :set fillchars=stl:^,stlnc:=,vert:│,fold:·,diff:-
< This is similar to the default, except that these characters will also
be used when there is highlighting.
@@ -2712,6 +2715,10 @@ A jump table for the options with a short description can be found at |Q_op|.
:s///g subst. one subst. all
:s///gg subst. all subst. one
+ DEPRECATED: Setting this option may break plugins that are not aware
+ of this option. Also, many users get confused that adding the /g flag
+ has the opposite effect of that it normally does.
+
*'grepformat'* *'gfm'*
'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
global
@@ -3301,7 +3308,17 @@ A jump table for the options with a short description can be found at |Q_op|.
pattern and/or a lot of text the match may not be found. This is to
avoid that Vim hangs while you are typing the pattern.
The |hl-IncSearch| highlight group determines the highlighting.
- See also: 'hlsearch'.
+ When 'hlsearch' is on, all matched strings are highlighted too while typing
+ a search command. See also: 'hlsearch'.
+ If you don't want turn 'hlsearch' on, but want to highlight all matches
+ while searching, you can turn on and off 'hlsearch' with autocmd.
+ Example: >
+ augroup vimrc-incsearch-highlight
+ autocmd!
+ autocmd CmdlineEnter /,\? :set hlsearch
+ autocmd CmdlineLeave /,\? :set nohlsearch
+ augroup END
+<
CTRL-L can be used to add one character from after the current match
to the command line. If 'ignorecase' and 'smartcase' are set and the
command line has no uppercase characters, the added character is
@@ -3672,7 +3689,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< Minimum value is 2, maximum value is 1000.
*'linespace'* *'lsp'*
-'linespace' 'lsp' number (default 0, 1 for Win32 GUI)
+'linespace' 'lsp' number (default 0)
global
{only in the GUI}
Number of pixel lines inserted between characters. Useful if the font
@@ -3809,6 +3826,23 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'makeencoding'* *'menc'*
+'makeencoding' 'menc' string (default "")
+ global or local to buffer |global-local|
+ {only available when compiled with the |+multi_byte|
+ feature}
+ {not in Vi}
+ Encoding used for reading the output of external commands. When empty,
+ encoding is not converted.
+ This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`,
+ `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`,
+ and `:laddfile`.
+
+ This would be mostly useful when you use MS-Windows. If |+iconv| is
+ enabled and GNU libiconv is used, setting 'makeencoding' to "char" has
+ the same effect as setting to the system locale encoding. Example: >
+ :set makeencoding=char " system locale is used
+<
*'makeprg'* *'mp'*
'makeprg' 'mp' string (default "make")
global or local to buffer |global-local|
@@ -5132,10 +5166,10 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'shellcmdflag'* *'shcf'*
-'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/c")
+'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/s /c")
global
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
- "bash.exe -c ls" or "cmd.exe /c dir". For Windows
+ `bash.exe -c ls` or `cmd.exe /s /c "dir"`. For Windows
systems, the default is set according to the value of 'shell', to
reduce the need to set this option by the user.
On Unix it can have more than one flag. Each white space separated
@@ -5256,7 +5290,7 @@ A jump table for the options with a short description can be found at |Q_op|.
to execute most external commands with cmd.exe.
*'shellxquote'* *'sxq'*
-'shellxquote' 'sxq' string (default: "")
+'shellxquote' 'sxq' string (default: "", Windows: "\"")
global
Quoting character(s), put around the command passed to the shell, for
the "!" and ":!" commands. Includes the redirection. See
@@ -5420,14 +5454,13 @@ A jump table for the options with a short description can be found at |Q_op|.
See |tab-page| for more information about tab pages.
*'sidescroll'* *'ss'*
-'sidescroll' 'ss' number (default 0)
+'sidescroll' 'ss' number (default 1)
global
The minimal number of columns to scroll horizontally. Used only when
the 'wrap' option is off and the cursor is moved off of the screen.
When it is zero the cursor will be put in the middle of the screen.
- When using a slow terminal set it to a large number or 0. When using
- a fast terminal use a small number or 1. Not used for "zh" and "zl"
- commands.
+ When using a slow terminal set it to a large number or 0. Not used
+ for "zh" and "zl" commands.
*'sidescrolloff'* *'siso'*
'sidescrolloff' 'siso' number (default 0)
@@ -6192,7 +6225,6 @@ A jump table for the options with a short description can be found at |Q_op|.
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
the terminal (thus using 24-bit color). Requires a ISO-8613-3
compatible terminal.
- Must be set at startup (in your |init.vim| or |--cmd|).
*'terse'* *'noterse'*
'terse' boolean (default off)
@@ -6258,15 +6290,14 @@ A jump table for the options with a short description can be found at |Q_op|.
*'timeoutlen'* *'tm'*
'timeoutlen' 'tm' number (default 1000)
global
- The time in milliseconds that is waited for a mapped sequence to
- complete.
+ Time in milliseconds to wait for a mapped sequence to complete.
*'ttimeoutlen'* *'ttm'*
'ttimeoutlen' 'ttm' number (default 50)
global
- The time in milliseconds that is waited for a key code
- sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G
- when part of a command has been typed.
+ Time in milliseconds to wait for a key code sequence to complete. Also
+ used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has
+ been typed.
*'title'* *'notitle'*
'title' boolean (default off)
@@ -6424,6 +6455,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Currently, these messages are given:
>= 1 When the shada file is read or written.
>= 2 When a file is ":source"'ed.
+ >= 3 UI info, terminal capabilities
>= 5 Every searched tags file and include file.
>= 8 Files for which a group of autocommands is executed.
>= 9 Every executed autocommand.
@@ -6895,7 +6927,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'writedelay' 'wd' number (default 0)
global
The number of milliseconds to wait for each character sent to the
- screen. When non-zero, characters are sent to the terminal one by
- one. For debugging purposes.
+ screen. When positive, characters are sent to the UI one by one.
+ When negative, all redrawn characters cause a delay, even if the
+ character already was displayed by the UI. For debugging purposes.
vim:tw=78:ts=8:ft=help:noet:norl:
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index b806b08f95..4a76f1399e 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -33,20 +33,20 @@ To use Vim Python 2/3 plugins with Nvim:
- For Python 2 plugins, make sure an interpreter for Python 2.6 or 2.7 is
available in your `$PATH`, then install the `neovim` Python package systemwide: >
- $ sudo pip2 install --upgrade neovim
+ sudo pip2 install --upgrade neovim
<
or for the current user: >
- $ pip2 install --user --upgrade neovim
+ pip2 install --user --upgrade neovim
<
- For Python 3 plugins, make sure an interpreter for Python 3.3 or above is
available in your `$PATH`, then install the `neovim` Python package systemwide: >
- $ sudo pip3 install --upgrade neovim
+ sudo pip3 install --upgrade neovim
<
or for the current user: >
- $ pip3 install --user --upgrade neovim
+ pip3 install --user --upgrade neovim
<
Note: The `--upgrade` flag ensures you have the latest version even if
- a previous version was already installed.
+a previous version was already installed.
PYTHON PROVIDER CONFIGURATION ~
*g:python_host_prog*
@@ -93,7 +93,7 @@ Run |:checkhealth| to see if your system is up-to-date.
RUBY QUICKSTART ~
To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: >
- $ gem install neovim
+ gem install neovim
RUBY PROVIDER CONFIGURATION ~
*g:loaded_ruby_provider*
@@ -112,7 +112,30 @@ To use an absolute path (e.g. to an rbenv installation): >
To use the RVM "system" Ruby installation: >
let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
<
+==============================================================================
+Node.js integration *provider-nodejs*
+
+Nvim supports Node.js |remote-plugin|s.
+https://github.com/neovim/node-client/
+https://nodejs.org/
+NODEJS QUICKSTART~
+
+To use javascript remote-plugins with Nvim, install the `neovim` npm package: >
+ npm install -g neovim
+<
+NODEJS PROVIDER CONFIGURATION~
+ *g:loaded_node_provider*
+To disable Node support: >
+ :let g:loaded_node_provider = 1
+<
+ *g:node_host_prog*
+Command to start the Node host. Setting this makes startup faster.
+
+By default, Nvim searches for `neovim-node-host` using "npm root -g", which
+can be slow. To avoid this, set g:node_host_prog to an absolute path: >
+ let g:node_host_prog = '/usr/local/bin/neovim-node-host'
+<
==============================================================================
Clipboard integration *provider-clipboard* *clipboard*
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index da167c0f5b..f280286290 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -165,6 +165,9 @@ processing a quickfix or location list command, it will be aborted.
keep Vim running while compiling. If you give the
name of the errorfile, the 'errorfile' option will
be set to [errorfile]. See |:cc| for [!].
+ If the encoding of the error file differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
*:lf* *:lfile*
:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
@@ -176,6 +179,9 @@ processing a quickfix or location list command, it will be aborted.
:cg[etfile] [errorfile] *:cg* *:cgetfile*
Read the error file. Just like ":cfile" but don't
jump to the first error.
+ If the encoding of the error file differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
:lg[etfile] [errorfile] *:lg* *:lgetfile*
@@ -186,6 +192,9 @@ processing a quickfix or location list command, it will be aborted.
:caddf[ile] [errorfile] Read the error file and add the errors from the
errorfile to the current quickfix list. If a quickfix
list is not present, then a new list is created.
+ If the encoding of the error file differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
*:laddf* *:laddfile*
:laddf[ile] [errorfile] Same as ":caddfile", except the location list for the
@@ -322,6 +331,7 @@ use this code: >
endfunction
au QuickfixCmdPost make call QfMakeConv()
+Another option is using 'makeencoding'.
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
*:cdo*
@@ -460,7 +470,11 @@ keep its height, ignoring 'winheight' and 'equalalways'. You can change the
height manually (e.g., by dragging the status line above it with the mouse).
In the quickfix window, each line is one error. The line number is equal to
-the error number. You can use ":.cc" to jump to the error under the cursor.
+the error number. The current entry is highlighted with the QuickFixLine
+highlighting. You can change it to your liking, e.g.: >
+ :hi QuickFixLine ctermbg=Yellow guibg=Yellow
+
+You can use ":.cc" to jump to the error under the cursor.
Hitting the <Enter> key or double-clicking the mouse on a line has the same
effect. The file containing the error is opened in the window above the
quickfix window. If there already is a window for that file, it is used
@@ -586,6 +600,9 @@ lists, use ":cnewer 99" first.
like |:cnext| and |:cprevious|, see above.
This command does not accept a comment, any "
characters are considered part of the arguments.
+ If the encoding of the program output differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
*:lmak* *:lmake*
:lmak[e][!] [arguments]
@@ -645,6 +662,7 @@ read the error messages: >
au QuickfixCmdPost make call QfMakeConv()
(Example by Faque Cheng)
+Another option is using 'makeencoding'.
==============================================================================
5. Using :vimgrep and :grep *grep* *lid*
@@ -759,6 +777,9 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
When 'grepprg' is "internal" this works like
|:vimgrep|. Note that the pattern needs to be
enclosed in separator characters then.
+ If the encoding of the program output differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
*:lgr* *:lgrep*
:lgr[ep][!] [arguments] Same as ":grep", except the location list for the
@@ -783,6 +804,10 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
\ | catch /E480:/
\ | endtry"
<
+ If the encoding of the program output differs from the
+ 'encoding' option, you can use the 'makeencoding'
+ option to specify the encoding.
+
*:lgrepa* *:lgrepadd*
:lgrepa[dd][!] [arguments]
Same as ":grepadd", except the location list for the
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index b22d2afa7e..a0ca17cc4a 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -655,7 +655,6 @@ Short explanation of each option: *option-list*
'cscoperelative' 'csre' Use cscope.out path basename as prefix
'cscopetag' 'cst' use cscope for tag commands
'cscopetagorder' 'csto' determines ":cstag" search order
-'cscopeverbose' 'csverb' give messages when adding a cscope database
'cursorbind' 'crb' move cursor in window as it moves in other windows
'cursorcolumn' 'cuc' highlight the screen column of the cursor
'cursorline' 'cul' highlight the screen line of the cursor
@@ -762,6 +761,7 @@ Short explanation of each option: *option-list*
'loadplugins' 'lpl' load plugin scripts when starting up
'magic' changes special characters in search patterns
'makeef' 'mef' name of the errorfile for ":make"
+'makeencoding' 'menc' encoding of external make/grep commands
'makeprg' 'mp' program to use for the ":make" command
'matchpairs' 'mps' pairs of characters that "%" can match
'matchtime' 'mat' tenths of a second to show matching paren
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 9b33926d04..21c47edc24 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -249,14 +249,14 @@ argument.
for reading or writing a ShaDa file. Can be used to find
out what is happening upon startup and exit.
Example: >
- vim -V8 foobar
+ nvim -V8
-V[N]{filename}
- Like -V and set 'verbosefile' to {filename}. The result is
- that messages are not displayed but written to the file
- {filename}. {filename} must not start with a digit.
+ Like -V and set 'verbosefile' to {filename}. Messages are not
+ displayed; instead they are written to the file {filename}.
+ {filename} must not start with a digit.
Example: >
- vim -V20vimlog foobar
+ nvim -V20vimlog
<
*-D*
-D Debugging. Go to debugging mode when executing the first
@@ -355,6 +355,10 @@ argument.
instead.
See also |silent-mode|, which does start a (limited) UI.
+--listen {addr} *--listen*
+ Start |RPC| server on pipe or TCP address {addr}. Sets the
+ primary listen address |v:servername| to {addr}. |serverstart()|
+
==============================================================================
2. Initialization *initialization* *startup*
@@ -439,15 +443,14 @@ accordingly. Vim proceeds in this order:
:runtime! filetype.vim
:runtime! ftplugin.vim
:runtime! indent.vim
-< This step is skipped if ":filetype ..." was called before now or if
- the "-u NONE" command line argument was given.
+< Skipped if ":filetype … off" was called or if the "-u NONE" command
+ line argument was given.
5. Enable syntax highlighting.
This does the same as the command: >
:runtime! syntax/syntax.vim
-< Note: This enables filetype detection even if ":filetype off" was
- called before now.
- This step is skipped if the "-u NONE" command line argument was given.
+< Skipped if ":syntax off" was called or if the "-u NONE" command
+ line argument was given.
6. Load the plugin scripts. *load-plugins*
This does the same as the command: >
@@ -1392,4 +1395,4 @@ RPC clients for debugging. $NVIM_LOG_FILE contains the log file path: >
Usually the file is ~/.local/share/nvim/log unless that path is inaccessible
or if $NVIM_LOG_FILE was set before |startup|.
- vim:tw=78:ts=8:ft=help:norl:
+ vim:noet:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 85330f3dec..fa66d9d071 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -4709,17 +4709,7 @@ ctermbg={color-nr} *highlight-ctermbg*
"cterm". For example, on some systems "cterm=bold ctermfg=3" gives
another color, on others you just get color 3.
- For an xterm this depends on your resources, and is a bit
- unpredictable. See your xterm documentation for the defaults. The
- colors for a color-xterm can be changed from the .Xdefaults file.
- Unfortunately this means that it's not possible to get the same colors
- for each user.
-
- The MSDOS standard colors are fixed (in a console window), so these
- have been used for the names. But the meaning of color names in X11
- are fixed, so these color settings have been used, to make the
- highlighting settings portable (complicated, isn't it?). The
- following names are recognized, with the color number used:
+ The following names are recognized, with the color number used:
*cterm-colors*
NR-16 NR-8 COLOR NAME ~
@@ -4919,6 +4909,8 @@ MatchParen The character under the cursor or just before it, if it
*hl-ModeMsg*
ModeMsg 'showmode' message (e.g., "-- INSERT --")
+ *hl-MsgSeparator*
+MsgSeparator Separator for scrolled messages, `msgsep` flag of 'display'
*hl-MoreMsg*
MoreMsg |more-prompt|
*hl-NonText*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index a694185fc9..075ffdac52 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -38,13 +38,13 @@ Otherwise Nvim cannot know what sequences your terminal expects, and weird
or sub-optimal behavior will result (scrolling quirks, wrong colors, etc.).
$TERM is also important because it is mirrored by SSH to the remote session,
-unlike other common client-end environment variables ($COLORTERM,
-$XTERM_VERSION, $VTE_VERSION, $KONSOLE_PROFILE_NAME, $TERM_PROGRAM, ...).
+unlike most other environment variables.
For this terminal Set $TERM to |builtin-terms|
-------------------------------------------------------------------------
iTerm (original) iterm, iTerm.app N
iTerm2 (new capabilities) iterm2, iTerm2.app Y
+ Konsole konsole-256color N
anything libvte-based vte, vte-256color Y
(e.g. GNOME Terminal) (aliases: gnome, gnome-256color)
tmux tmux, tmux-256color Y
@@ -232,11 +232,6 @@ correct values. See |:mode|.
Slow and fast terminals *slow-fast-terminal*
*slow-terminal*
-If you have a fast terminal you may like to set the 'ruler' option. The
-cursor position is shown in the status line. If you are using horizontal
-scrolling ('wrap' option off) consider setting 'sidescroll' to a small
-number.
-
If you have a slow terminal you may want to reset the 'showcmd' and 'ruler'
options. The command characters and cursor positions will not be shown in the
status line (which involves a lot of cursor motions and attribute changes for
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt
index 685019aed7..6f6df2d7ae 100644
--- a/runtime/doc/ui.txt
+++ b/runtime/doc/ui.txt
@@ -9,7 +9,7 @@ Nvim UI protocol *ui*
Type |gO| to see the table of contents.
==============================================================================
-Introduction *ui-intro*
+UI Events *ui-events*
GUIs can be implemented as external processes communicating with Nvim over the
RPC API. The UI model consists of a terminal-like grid with a single,
@@ -30,10 +30,22 @@ a dictionary with these (optional) keys:
`ext_cmdline` Externalize the cmdline. |ui-cmdline|
`ext_wildmenu` Externalize the wildmenu. |ui-ext-wildmenu|
-Nvim will then send msgpack-rpc notifications, with the method name "redraw"
-and a single argument, an array of screen update events.
-Update events are tuples whose first element is the event name and remaining
-elements the event parameters.
+Specifying a non-existent option is an error. To facilitate an ui that
+supports different versions of Nvim, the |api-metadata| key `ui_options`
+contains the list of supported options. Additionally Nvim currently requires
+that all connected UIs use the same set of widgets. Therefore the active
+widgets will be the intersection of the requested widget sets of all connected
+UIs. The "option_set" event will be used to specify which widgets actually are
+active.
+
+After attaching, Nvim will send msgpack-rpc notifications, with the method
+name "redraw" and a single argument, an array of screen update events. Update
+events are arrays whose first element is the event name and remaining elements
+are each tuples of event parameters. This allows multiple events of the same
+kind to be sent in a row without the event name being repeated. This batching
+is mostly used for "put", as each "put" event just puts contents in one screen
+cell, but clients must be prepared for multiple argument sets being batched
+for all event kinds.
Events must be handled in order. The user should only see the updated screen
state after all events in the same "redraw" batch are processed (not any
@@ -80,6 +92,29 @@ Global Events *ui-global*
Some keys are missing in some modes.
+["option_set", name, value]
+ The value of ui related option `name` changed. The sent options are
+ listed below:
+
+ 'arabicshape'
+ 'ambiwith'
+ 'emoji'
+ 'guifont'
+ 'guifontset'
+ 'guifontwide'
+ 'linespace'
+ 'showtabline'
+ 'termguicolors'
+ `ext_*` (all |ui-ext-options|)
+
+ Options are not added to the list if their effects are already taken
+ care of. For instance, instead of forwarding the raw 'mouse' option
+ value, `mouse_on` and `mouse_off` directly indicate if mouse support
+ is active right now. Some options like 'ambiwith' have already taken
+ effect on the grid, where appropriate empty cells are added, however
+ an ui might still use these options when rendering raw text sent from
+ Nvim, like the text of the cmdline when |ui-ext-cmdline| is set.
+
["mode_change", mode, mode_idx]
The mode changed. The first parameter `mode` is a string representing
the current mode. `mode_idx` is an index into the array received in
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index baac72c106..9232cd70c5 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -207,21 +207,18 @@ g8 Print the hex values of the bytes used in the
:sh[ell] Removed. |vim-differences| {Nvim}
*:terminal* *:te*
-:te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal| buffer.
- Equivalent to: >
- :enew
- :call termopen('{cmd}')
-<
- See |termopen()|.
+:te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal-emulator|
+ buffer. Without {cmd}, start an interactive 'shell'.
- Without {cmd}, start an interactive shell.
+ Type |i| to enter |Terminal-mode|, then keys are sent to
+ the job running in the terminal. Type <C-\><C-N> to
+ leave Terminal-mode. |CTRL-\_CTRL-N|
- Creating the terminal buffer fails when changes have been
- made to the current buffer, unless 'hidden' is set.
+ Fails if changes have been made to the current buffer,
+ unless 'hidden' is set.
To enter |Terminal-mode| automatically: >
- autocmd BufEnter term://* startinsert
- autocmd BufLeave term://* stopinsert
+ autocmd TermOpen * startinsert
<
*:!cmd* *:!* *E34*
:!{cmd} Execute {cmd} with 'shell'. See also |:terminal|.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index c8155f7a68..3575a420b7 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -32,8 +32,10 @@ a complete and centralized reference of those differences.
- 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|)
- 'belloff' defaults to "all"
- 'complete' doesn't include "i"
+- 'cscopeverbose' is enabled
- 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created
-- 'display' defaults to "lastline"
+- 'display' defaults to "lastline,msgsep"
+- 'fillchars' defaults (in effect) to "vert:│,fold:·"
- 'formatoptions' defaults to "tcqj"
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is set by default
@@ -47,6 +49,7 @@ a complete and centralized reference of those differences.
- 'ruler' is set by default
- 'sessionoptions' doesn't include "options"
- 'showcmd' is set by default
+- 'sidescroll' defaults to 1
- 'smarttab' is set by default
- 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags"
@@ -70,6 +73,7 @@ Providers
Ruby plugins |provider-ruby|
Shared data |shada|
Embedded terminal |terminal|
+VimL parser |nvim_parse_expression()|
XDG base directories |xdg|
USER EXPERIENCE ~
@@ -126,7 +130,9 @@ Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants
Options:
'cpoptions' flags: |cpo-_|
+ 'display' flag `msgsep` to minimize scrolling when showing messages
'guicursor' works in the terminal
+ 'fillchars' flag `msgsep` (see 'display' above)
'inccommand' shows interactive results for |:substitute|-like commands
'scrollback'
'statusline' supports unlimited alignment sections
@@ -160,19 +166,23 @@ Events:
Highlight groups:
|hl-NormalNC| highlights non-current windows
+ |hl-MsgSeparator| highlights separator for scrolled messages
|hl-QuickFixLine|
|hl-Substitute|
|hl-TermCursor|
|hl-TermCursorNC|
|hl-Whitespace| highlights 'listchars' whitespace
-
-UI:
- *E5408* *E5409* *g:Nvim_color_expr* *g:Nvim_color_cmdline*
- Command-line coloring is supported. Only |input()| and |inputdialog()| may
- be colored. For testing purposes expressions (e.g. |i_CTRL-R_=|) and regular
- command-line (|:|) are colored by callbacks defined in `g:Nvim_color_expr`
- and `g:Nvim_color_cmdline` respectively (these callbacks are for testing
- only, and will be removed in a future version).
+ |expr-highlight| highlight groups (prefixed with "Nvim")
+
+Command-line highlighting:
+ The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
+ using a built-in VimL expression parser. |expr-highlight|
+ *E5408* *E5409*
+ |input()|, |inputdialog()| support custom highlighting. |input()-highlight|
+ *g:Nvim_color_cmdline*
+ (Experimental) Command-line (|:|) is colored by callback defined in
+ `g:Nvim_color_cmdline` (this callback is for testing only, and will be
+ removed in the future).
==============================================================================
4. Changed features *nvim-features-changed*
@@ -299,7 +309,8 @@ Highlight groups:
|hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
groups
-The variable name "count" is no fallback for |v:count| anymore.
+VimL (Vim script) compatibility:
+ `count` does not alias to |v:count|
==============================================================================
5. Missing legacy features *nvim-features-missing*
@@ -327,22 +338,26 @@ Ed-compatible mode:
":set noedcompatible" is ignored
":set edcompatible" is an error
- *t_xx* *:set-termcap* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
+ *t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
terminal capabilities. Instead Nvim treats the terminal as any other UI. For
example, 'guicursor' sets the terminal cursor style if possible.
- *'term'* *E529* *E530* *E531*
+ *:set-termcap*
+Start Nvim with 'verbose' level 3 to see the terminal capabilities. >
+ nvim -V3
+<
+ *'term'* *E529* *E530* *E531*
'term' reflects the terminal type derived from |$TERM| and other environment
checks. For debugging only; not reliable during startup. >
:echo &term
"builtin_x" means one of the |builtin-terms| was chosen, because the expected
terminfo file was not found on the system.
- *termcap*
+ *termcap*
Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.
- *xterm-8bit* *xterm-8-bit*
+ *xterm-8bit* *xterm-8-bit*
Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this
requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
mode, as the 8-bit CSI character has to be written differently in each case.
@@ -365,7 +380,6 @@ MS-DOS support:
Test functions:
test_alloc_fail()
test_autochdir()
- test_disable_char_avail()
test_garbagecollect_now()
test_null_channel()
test_null_dict()
@@ -373,6 +387,7 @@ Test functions:
test_null_list()
test_null_partial()
test_null_string()
+ test_override()
test_settime()
Other options: