summaryrefslogtreecommitdiffstats
path: root/runtime/doc/quickfix.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-26 12:25:45 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-26 12:25:45 +0000
commitc51cf0329809c7ae946c59d6f56699227efc9d1b (patch)
tree825302ef0857905dbf08dc584ef6d6a8aae27790 /runtime/doc/quickfix.txt
parente41c1dd8890d3f701253255993f4e9af2d12225c (diff)
Update runtime files.
Diffstat (limited to 'runtime/doc/quickfix.txt')
-rw-r--r--runtime/doc/quickfix.txt24
1 files changed, 21 insertions, 3 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index b2b5514e37..ca00278bc3 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1,4 +1,4 @@
-*quickfix.txt* For Vim version 8.2. Last change: 2022 Feb 08
+*quickfix.txt* For Vim version 8.2. Last change: 2022 Feb 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -353,7 +353,7 @@ processing a quickfix or location list command, it will be aborted.
cursor position will not be changed. See |:cexpr| for
more information.
Example: >
- :g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
+ :g/mypattern/caddexpr expand("%") .. ":" .. line(".") .. ":" .. getline(".")
<
*:lad* *:addd* *:laddexpr*
:lad[dexpr] {expr} Same as ":caddexpr", except the location list for the
@@ -654,6 +654,24 @@ quickfix window. If there already is a window for that file, it is used
instead. If the buffer in the used window has changed, and the error is in
another file, jumping to the error will fail. You will first have to make
sure the window contains a buffer which can be abandoned.
+
+The following steps are used to find a window to open the file selected from
+the quickfix window:
+1. If 'switchbuf' contains "usetab", then find a window in any tabpage
+ (starting with the first tabpage) that has the selected file and jump to
+ it.
+2. Otherwise find a window displaying the selected file in the current tab
+ page (starting with the window before the quickfix window) and use it.
+3. Otherwise find a window displaying a normal buffer ('buftype' is empty)
+ starting with the window before the quickfix window. If a window is found,
+ open the file in that window.
+4. If a usable window is not found and 'switchbuf' contains "uselast", then
+ open the file in the last used window.
+5. Otherwise open the file in the window before the quickfix window. If there
+ is no previous window, then open the file in the next window.
+6. If a usable window is not found in the above steps, then create a new
+ horizontally split window above the quickfix window and open the file.
+
*CTRL-W_<Enter>* *CTRL-W_<CR>*
You can use CTRL-W <Enter> to open a new window and jump to the error there.
@@ -663,7 +681,7 @@ FileType event (also see |qf.vim|). Then the BufReadPost event is triggered,
using "quickfix" for the buffer name. This can be used to perform some action
on the listed errors. Example: >
au BufReadPost quickfix setlocal modifiable
- \ | silent exe 'g/^/s//\=line(".")." "/'
+ \ | silent exe 'g/^/s//\=line(".") .. " "/'
\ | setlocal nomodifiable
This prepends the line number to each line. Note the use of "\=" in the
substitute string of the ":s" command, which is used to evaluate an