O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required