以下是有关快速修复列表和位置列表的文档。但是我不确定到底有什么不同。下图显示了位置列表和快速修复列表中的相同内容。我何时在vimgrep和lvimgrep中使用一个或另一个。
In Vim the quickfix commands are used more generally to find a list of positions
in files.For example, |:vimgrep| finds pattern matches. You can use the positions
in a script with the |getqflist()| function. Thus you can do a lot more than the
edit/compile/fix cycle!
...
...
*location-list* *E776*
A location list is similar to a quickfix list and contains a list of positions
in files. A location list is associated with a window and each window can have
a separate location list. A location list can be associated with only one window.
The location list is independent of the quickfix list.
...
更新
我从这里找到了以下内容。
These commands all fill a list with the results of their search. "grep" and
"vimgrep" fill the "quickfix list", which can be opened with :cw or :copen,
and is a list shared between ALL windows. "lgrep" and "lvimgrep" fill the
"location list," which is local to the current window, and can be opened
with :lw or :lopen. Both of these lists can be used to instantly jump to
the matching line in whatever file it occurs in.
因此,不同之处在于,所有用于快速修复列表的窗口和用于位置列表的本地窗口。但是,我可以从任何其他窗口打开位置列表。那有什么区别呢?