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 the results need to be accessed in multiple windows, while a location list is great for capturing output relevant to a single window.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.108.54