68497Re: hiding lines
- May 1, 2006On 5/2/06, Gary Johnson <garyjohn@...> wrote:
> > Thus spake Yakov Lerner on Mon, May 01, 2006 at 10:06:57PM +0300 or thereabouts: <iler.ml@...> [2006-05-01 17:25]:Yes, 'grep -v' in vim is easy. But how do you remove #ifdef blocks ?
> > > On 5/1/06, Bill Pursell <bill.pursell@...> 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:
I mentioned piping because there is ready utility, 'unifdef',
that removes some or all of #if blocks.
- << Previous post in topic Next post in topic >>