Quickfix list

You've already had a brush with a quickfix window in Chapter 2Advanced Editing and Navigation, but let's dig a bit deeper into it.

Vim has an additional mode that makes jumping to certain parts of files easier. Some Vim commands use it to navigate between positions in files, such as jumping to compile errors for :make or search terms for :grep or :vimgrep. Plugins such as linters (syntax checking) or test runners use the quickfix list as well.

Let's try using a quickfix list by running a :grep command to search for the animal keyword recursively (-r) in every Python file (--include="*.py"), starting in the current directory (.):

:grep -r --include="*.py" animal .

This will open the first match in a current window. To open ...

Get Mastering Vim now with O’Reilly online learning.

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