Vim Recall繁體中文

Based on :vimgrep; append to current list

:vimgrepadd

Example

Normal 0 / 2

Based on :vimgrep; append to current list.

Quickfix list

existing entry
old.txt:1: previous result
Before & after

Before

Quickfix list

existing entry
old.txt:1: previous result

After

Quickfix list

1
old.txt:1: previous result
2
a.txt:1:1: TODO red
3
b.txt:1:1: TODO blue

Subject: :vimgrepadd. Documentation-backed illustration; assumes +quickfix, readable exact fixture files in current directory, neither fixture file already loaded; wildignore and suffixes empty; no autocommands or callbacks alter the search, current directory, buffer/cursor or quickfix list; j flag supplied; not replay-verified. Appends the two TODO matches to the current quickfix list. The j flag keeps the current buffer/cursor instead of jumping to a match.

Sample buffer
notes
Cursor on line 1, column 1
Details & Vim help

Based on :vimgrep; append to current list. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :vimgrepa[dd] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.