How do I configure quickfix parsing for grep output with file, line, and column?
:set grepformat=%f:%l:%c:%m
When :grep output does not land cleanly in quickfix, the parser format is usually the missing piece.
73 results for "vimgrep quickfix"
:set grepformat=%f:%l:%c:%m
When :grep output does not land cleanly in quickfix, the parser format is usually the missing piece.
:packadd cfilter | Cfilter /ERROR/
Quickfix lists can get noisy in large projects, especially when one grep or compiler run mixes several classes of issues.
:cexpr []
After a :grep, :make, or :vimgrep run, the quickfix list fills with results.
command-line #command-line #buffers-windows #quickfix #ex-commands
:cfdo %s/\<GetUser\>/FetchUser/ge | update
When quickfix has many matches per file, :cdo can execute your command repeatedly in the same buffer.
command-line #command-line #quickfix #refactoring #ex-commands #search
:cdo keeppatterns s/\<foo\>/bar/gec | update
When quickfix already contains precise targets, :cdo gives you a safer multi-file replace loop than broad project substitutions.
command-line #command-line #quickfix #substitute #refactoring
:cdo keepjumps keeppatterns %s/\<OldSymbol\>/NewSymbol/ge | update
When you run :cdo over a large quickfix list, Vim can leave your jump list noisy and your last search pattern overwritten.
command-line #quickfix #ex-commands #search #editing #refactoring
:botright copen 8 | wincmd p
Quickfix is powerful, but opening it can disrupt window layout and yank focus away from your current editing context.
:lvimgrep /pattern/gj **/*.js | lopen
When you already rely on the global quickfix list for compiler errors or another search, running :vimgrep can wipe that context.
:cnext
The quickfix list is Vim's built-in way to collect a list of positions — typically compiler errors, grep results, or linter warnings — and jump between them
]q and [q
The vim-unimpaired plugin by Tim Pope provides pairs of bracket mappings for common navigation and toggling tasks.
:cdo s/foo/bar/ge | update
When quickfix already contains exactly the lines you want to touch, :cdo is the safest way to batch-edit with tight scope.
command-line #command-line #quickfix #substitution #refactoring
:cdo normal! @q
When a refactor target spans many files but only specific matches matter, running a macro globally is risky.
:packadd cfilter | Cfilter /pattern/
Large quickfix lists are hard to work with when you only care about one subset of matches.
:cexpr system('grep -rn pattern .')
While :make and :grep populate the quickfix list, they are limited to their configured programs.
:cdo normal! @a | update
When you already have a precise quickfix list, :cdo is one of the safest ways to run a macro only where it matters.
]q
The vim-unimpaired plugin (by Tim Pope) provides a consistent [x / ]x mnemonic for navigating any list-like structure in Vim.
:chistory
Every time you run :grep, :vimgrep, :make, or :cexpr, Vim creates a new quickfix list and pushes the previous one onto a history stack.
buffers-windows #buffers-windows #quickfix #navigation #ex-commands
:lgrep /pattern/ % | lopen
Quickfix is global, but sometimes you want a narrower search workspace tied to one window.
:lgrep {pattern} {files}
The location list is a per-window counterpart to the global quickfix list.
buffers-windows #buffers-windows #ex-commands #search #navigation
setqflist()
setqflist() lets you build the quickfix list from a Vimscript list of dictionaries rather than relying on compiler output or :vimgrep.