Quickfix and Location Lists

A typed list of file:line:message โ€” the spine of grep, make, and lint workflows.

Keys: :make, :grep, :vimgrep, :copen, :cnext, :cprev, :cclose

:make, :grep, and :vimgrep populate the quickfix list. :copen shows it; :cnext / :cprev step through entries. The location list is the per-window twin.

The quickfix list is Vim's universal results pane. Compile errors, grep hits, lint warnings, test failures โ€” they all funnel into the same list with the same navigation keys. Once you wire your tools through it, every command-line workflow becomes a structured editing session.

Populate the list

Command Effect
:make Run makeprg (default make), capture errors via errorformat
:make test Pass arguments to the make program
:grep PATTERN [PATH] Run external grep (grepprg), populate from results
:vimgrep /PATTERN/ FILES Run Vim's internal grep (no shell)
:vimgrep /TODO/ **/*.py Recursively find TODO in Python files
:cexpr system('rg --vimgrep PATTERN') Inject any tool's output via errorformat

Navigate the list

Step through entries
KeyNote
`:copen`Open the quickfix window (fills the bottom)
`:cclose`Close it
`:cnext`Jump to the next entry
`:cprev`Jump to the previous entry
`:cfirst`Jump to the first
`:clast`Jump to the last
`:ccN`Jump to entry number N

Location list โ€” same idea, scoped to a window

Replace every c-prefixed command with l: :lmake, :lgrep, :lopen, :lnext, :lprev. The list lives on the window, not the editor, so two splits can run two greps without stepping on each other.

See also: Shell Commands (:!), Tag Navigation