aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/msgpack.vim11
-rw-r--r--runtime/doc/autocmd.txt9
-rw-r--r--runtime/doc/eval.txt51
-rw-r--r--runtime/doc/starting.txt3
4 files changed, 56 insertions, 18 deletions
diff --git a/runtime/autoload/msgpack.vim b/runtime/autoload/msgpack.vim
index 09c99c940d..7dd225e3d9 100644
--- a/runtime/autoload/msgpack.vim
+++ b/runtime/autoload/msgpack.vim
@@ -605,13 +605,10 @@ function msgpack#eval(s, special_objs) abort
call add(expr, dec)
endif
endif
- elseif s =~# '-\?\%(inf\|nan\)'
- if s[0] is# '-'
- call add(expr, '-')
- let s = s[1:]
- endif
- call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[0:2]])
- let s = s[3:]
+ elseif s =~# '\v^\-%(inf|nan)'
+ call add(expr, '-')
+ call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[1:3]])
+ let s = s[4:]
elseif stridx('="+', s[0]) != -1
let match = matchlist(s, '\v\C^(\=|\+\((\-?\d+)\)|)(\"%(\\.|[^\\"]+)*\")')
if empty(match)
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 24bcb13e6e..2f9d8aa7f7 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -274,7 +274,8 @@ Name triggered by ~
|GUIEnter| after starting the GUI successfully
|GUIFailed| after starting the GUI failed
|TermResponse| after the terminal response to |t_RV| is received
-|QuitPre| when using `:quit`, before deciding whether to quit
+|QuitPre| when using `:quit`, before deciding whether to exit
+|ExitPre| when using a command that may make Vim exit
|VimLeavePre| before exiting Nvim, before writing the shada file
|VimLeave| before exiting Nvim, after writing the shada file
|VimResume| after Nvim is resumed
@@ -646,6 +647,11 @@ FileChangedRO Before making the first change to a read-only
*E881*
If the number of lines changes saving for undo
may fail and the change will be aborted.
+ *ExitPre*
+ExitPre When using `:quit`, `:wq` in a way it makes
+ Vim exit, or using `:qall`, just after
+ |QuitPre|. Can be used to close any
+ non-essential window.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
@@ -862,6 +868,7 @@ QuitPre When using `:quit`, `:wq` or `:qall`, before
or quits Vim. Can be used to close any
non-essential window if the current window is
the last ordinary window.
+ Also see |ExitPre|.
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|. The
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index e51ecbd688..064c08c190 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4335,23 +4335,39 @@ getqflist([{what}]) *getqflist()*
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()|
+ efm errorformat to use when parsing "lines". If
+ not present, then the 'erroformat' option
+ value is used.
+ id get information for the quickfix list with
+ |quickfix-ID|; zero means the id for the
+ current list or the list specifed by "nr"
items quickfix list entries
+ lines use 'errorformat' to extract items from a list
+ of lines and return the resulting entries.
+ Only a |List| type is accepted. The current
+ quickfix list is not modified.
nr get information for this quickfix list; zero
- means the current quickfix list and '$' means
+ 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.
+ If both "nr" and a non-zero "id" are specified, then the list
+ specified by "id" 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.
+ When 'text' is specified, all the other items are ignored. The
+ returned dictionary contains the entry 'items' with the list
+ of entries.
In case of error processing {what}, an empty dictionary is
returned.
The returned dictionary contains the following entries:
context context information stored with |setqflist()|
+ id quickfix list ID |quickfix-ID|
items quickfix list entries
nr quickfix list number
title quickfix list title text
@@ -4360,6 +4376,7 @@ getqflist([{what}]) *getqflist()*
Examples: >
:echo getqflist({'all': 1})
:echo getqflist({'nr': 2, 'title': 1})
+ :echo getqflist({'lines' : ["F1:10:L10"]})
<
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
@@ -6851,10 +6868,12 @@ setpos({expr}, {list})
setqflist({list} [, {action}[, {what}]]) *setqflist()*
- Create or replace or add to the quickfix list using the items
- in {list}. Each item in {list} is a dictionary.
- Non-dictionary items in {list} are ignored. Each dictionary
- item can contain the following entries:
+ Create or replace or add to the quickfix list.
+
+ When {what} is not present, use the items in {list}. Each
+ item must be a dictionary. Non-dictionary items in {list} are
+ ignored. Each dictionary item can contain the following
+ entries:
bufnr buffer number; must be the number of a valid
buffer
@@ -6899,7 +6918,10 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
freed.
If {action} is not present or is set to ' ', then a new list
- is created.
+ is created. The new quickfix list is added after the current
+ quickfix list in the stack and all the following lists are
+ freed. To add a new quickfix list at the end of the stack,
+ set "nr" in {what} to "$".
If {title} is given, it will be used to set |w:quickfix_title|
after opening the quickfix window.
@@ -6909,20 +6931,31 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
argument is ignored. The following items can be specified in
{what}:
context any Vim type can be stored as a context
+ efm errorformat to use when parsing text from
+ "lines". If this is not present, then the
+ 'errorformat' option value is used.
+ id quickfix list identifier |quickfix-ID|
items list of quickfix entries. Same as the {list}
argument.
+ lines use 'errorformat' to parse a list of lines and
+ add the resulting entries to the quickfix list
+ {nr} or {id}. Only a |List| value is supported.
nr list number in the quickfix stack; zero
- means the current quickfix list and '$' means
+ 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
is modified. When creating a new quickfix list, "nr" can be
set to a value one greater than the quickfix stack size.
+ When modifying a quickfix list, to guarantee that the correct
+ list is modified, "id" should be used instead of "nr" to
+ specify the list.
Examples: >
- :call setqflist([], 'r', {'title': 'My search'})
- :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
+ :call setqflist([], 'r', {'title': 'My search'})
+ :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
+ :call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]})
<
Returns zero for success, -1 for failure.
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index c9ce2b9dc1..3440131642 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -76,7 +76,8 @@ The option arguments may be given in any order. Single-letter options can be
combined after one dash. There can be no option arguments after the "--"
argument.
---help *-h* *--help*
+--help *-h* *--help* *-?*
+-?
-h Give usage (help) message and exit.
See |info-message| about capturing the text.