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

Location list

In addition to a quickfix list, Vim also has a location list. It behaves just like a quickfix list, except that it stays local to the current window. While you can have only one quickfix list in a single Vim session, you can have as many location lists as you want.

To populate a location list, you can prefix most quickfix-operating commands with the letter l (such as :lgrep or :lmake).

Shortcuts also replace the :c prefix with the :l prefix:

  • :lopen opens the location window
  • :lclose closes the window
  • :lnext navigates to the next item in a location list
  • :lprevious navigates to the previous item in a location list
  • :lwindow toggles the quickfix window only if the errors were present

In general, you will use a quickfix list when ...

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