Based on :grep; append to current list
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Based on :grep; append to current list.
Search configuration
- grepprg
internal
Quickfix list
- 1
old.txt:1: previous match
Command entered · ready to apply
Search configuration
- grepprg
internal
Quickfix list
- 1
old.txt:1: previous match
Command line
- Typed text
:grepadd! /TODO/j tasks.txt- Insertion offset
27
:grepadd appends the two TODO matches in the quickfix list. The j flag keeps the current buffer and cursor.
Search configuration
- grepprg
internal
Quickfix list
- 1
old.txt:1: previous match- 2
tasks.txt:1: TODO first- 3
tasks.txt:3: TODO last
Before & after
Before
Search configuration
- grepprg
internal
Quickfix list
- 1
old.txt:1: previous match
After
Search configuration
- grepprg
internal
Quickfix list
- 1
old.txt:1: previous match- 2
tasks.txt:1: TODO first- 3
tasks.txt:3: TODO last
Documentation-backed illustration. +quickfix, the shown tasks.txt, grepprg=internal for grep-family commands, and Vim's /pattern/j syntax. :grepadd appends the two TODO matches in the quickfix list. The j flag keeps the current buffer and cursor. Primary help: :grepadd.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Based on :grep; 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 :grepa[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.