On 5/2/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
> Thus spake Yakov Lerner on Mon, May 01, 2006 at 10:06:57PM +0300 or thereabouts:
<[EMAIL PROTECTED]> [2006-05-01 17:25]:
> > On 5/1/06, Bill Pursell <[EMAIL PROTECTED]> wrote:
> > >Is it possible to completely hide lines? Something stronger than merely
> > >folding. In particular, I'd like to be able to display the buffer with
> > >all lines containing "assert" hidden, or to hide lines between and
> > >including #ifdef/#endif pairs. Can that be done?
> >
> > Piping the buffer text into temp. buffer through some sort
> > of grep -v.
I can't think of anything 'grep -v <pattern>' can do in this
situation that 'v/<patter>/d' can't, so here's one way to do this:
Yes, 'grep -v' in vim is easy. But how do you remove #ifdef blocks ?
I mentioned piping because there is ready utility, 'unifdef',
that removes some or all of #if blocks.
Yakov
gg"aYG
:new
"ap
:1d
:v/assert/d