Re: How to save filtered less results in a file or on stdout
On Tue 06 Apr 2021 at 08:34:24 (+0300), Andrei POPESCU wrote:
> On Lu, 05 apr 21, 22:29:31, David Wright wrote:
> >
> > But I don't know how vim would do on-the-fly filtering like
> > less can do with & (not being very familiar with vim).
>
> A quick web search suggests:
>
> :v/pattern/d
>
> press 'u' to undo or ':w filename.txt' to write the result to a
> different file.
That works fine; as you say, one has to learn the editor concerned,
or at least learn some tricks that aren't always as straightforward
in an editor as in less.
Cheers,
David.
Reply to: