Tip 106Browse the Quickfix List

The quickfix list holds a collection of locations from one or more files. Each record could be an error raised by the compiler when running :make, or it could be a search match from running :grep. No matter how the list was forged, we must be able to navigate these records. In this tip, we’ll review the ways of browsing the quickfix list.

An exhaustive list of commands for navigating the quickfix list can be found by looking up quickfix. Table 17, ​Commands for Working with the Quickfix List shows some of the most useful.

Table 17. Commands for Working with the Quickfix List
CommandAction

:cnext

Jump to next item

:cprev

Jump to previous item

:cfirst

Jump to first item

:clast

Jump to last item

:cnfile

Jump to first ...

Get Practical Vim, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.