I usually use vimgrep as an alternative to :g/pattern/# to find
matches if I expect to find a large number of matches that I need to
work through. Are there any benefits to using :vimgrep over :lvimgrep
or the other way around?
TIA,
Kevin
With :lvimgrep you may have several location lists at the same time (in
different windows), and do a new search without clobbering the other lists.
Thus you may go to the first/previous/next/last match in one list, and compare
it in another window with the last/next/previous/first match in another list.
I don't use it, :vimgrep is good enough for me.
The advantage of :vimgrep over :g is that it can work on many files at once,
for example
:vimgrep /\<Plantagenet\>/g ../**/*.htm
Best regards,
Tony.
--
Do what comes naturally now. Seethe and fume and throw a tantrum.
The extension of the above mentioned advantage is that if you use tabs
to display multiple files, then you can have a separate grep output
for each tab. If you use the "vimgrep" command then you have only
one global list for the grep output.
- Yegappan
s/tab/window/g
see ":help location-list"
Best regards,
Tony.
--
A parent can be arrested if his child cannot hold back a burp during a church
service.
[real standing law in Nebraska, United States of America]