How do I navigate through the quickfix list?
:cnext and :cprev
The quickfix list holds a set of file positions, typically from compiler errors, grep results, or other tools.
54 results for ":cnext"
:cnext and :cprev
The quickfix list holds a set of file positions, typically from compiler errors, grep results, or other tools.
: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
:copen / :cnext / :cprev
The quickfix list is Vim's built-in mechanism for navigating a list of file locations — compiler errors, grep results, search matches, or any structured outpu
navigation #navigation #quickfix #ex-commands #productivity #workflow
:vimgrep /\<TODO\>/gj **/*.lua | copen
When you want a project-wide TODO pass without leaving Vim, :vimgrep plus quickfix is a strong built-in workflow.
search #search #quickfix #command-line #project-navigation #ex-commands
:cgetexpr systemlist('rg --vimgrep TODO')
When you already have a shell command that emits file:line:col:message records, :cgetexpr is a fast way to populate quickfix directly.
:cfirst and :clast
:cfirst and :clast jump directly to the first or last entry in the quickfix list, skipping all intermediate results.
]q and [q
The vim-unimpaired plugin by Tim Pope provides pairs of bracket mappings for common navigation and toggling tasks.
:cexpr system('rg --vimgrep "TODO"')
When you already know you want an external search tool, :cexpr lets you import results directly into quickfix without opening a terminal buffer or shelling out
:vim /pattern/ **
:vimgrep /pattern/ (shortened to :vim) is Vim's built-in project-wide search.
:set makeprg=
The makeprg option defines the command that :make runs.
:0Gclog
vim-fugitive's :Gclog command loads the git log into the quickfix list, but when prefixed with the range 0 it restricts the history to only the commits that tou
[q / ]q
The vim-unimpaired plugin by Tim Pope provides bracket-pair mappings for navigating quickfix and location list entries: [q moves to the previous entry and ]q mo
:vimgrep /pattern/ **/*
While external tools like grep or ripgrep are fast, Vim's built-in :vimgrep has a key advantage: it populates the quickfix list directly, so you can jump betwee
:Gclog
Running :Gclog in vim-fugitive loads the git log for the current file into the quickfix list.
@:
The @: command re-executes the most recently run Ex command (any command starting with :).
command-line #command-line #ex-commands #repeat #normal-mode #productivity
:grep pattern files
The :grep command runs an external grep tool and loads the results into Vim's quickfix list.
:vimgrep /pattern/ **/*.ext | copen
The :vimgrep command searches for a regex pattern across multiple files and populates the quickfix list with every match.
search #search #quickfix #ex-commands #navigation #productivity #grep
[q, ]q, [b, ]b (vim-unimpaired)
vim-unimpaired by Tim Pope provides consistent bracket mappings for navigating paired items like quickfix entries, buffers, and more.
:vimgrep /pattern/ **/*.ext
The :vimgrep command searches for a pattern across multiple files and populates the quickfix list with the results.
:helpgrep
:helpgrep {pattern} searches all installed Vim help files for a pattern and populates the quickfix list with every match.