On Sat, 7 Oct 2006 at 12:43pm, Eric Smith wrote:
> I am using the following to search all buffers for "foo".
> b1|bufdo exec search("foo" , flags)
>
> This stops at the last match. How do I stop at the first match?
>
> thanx
>
The :bufdo and cousines stop when there is an error when the file can't
be |abondon|ed, so the easiest to stop is to generate an error,
something like:
:bufdo g/foo/throw 'Found match'
This generates an ugly error message, but at least it works. There may
be a more graceful way of generating error that someone can suggest.
--
HTH,
Hari
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com