hiding lines

2006-05-01 Thread Bill Pursell
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?

Hiding lines

2006-09-17 Thread Meino Christian Cramer
Hi, a few years ago I had to edit text files on a big iron (IBM) and a OS called "TCO" or such. The editor was [CENSORED] but there was one feature I miss since then: One could hide lines matching or !matching a certain pattern. Any further edit actions were only executed with the visible

Re: hiding lines

2006-05-01 Thread Yakov Lerner
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. C

Re: hiding lines

2006-05-01 Thread cga2000
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 a

Re: hiding lines

2006-05-01 Thread Gary Johnson
On 2006-05-01, cga2000 <[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 stron

Re: hiding lines

2006-05-01 Thread cga2000
Thus spake Gary Johnson on Mon, May 01, 2006 at 02:52:21PM -0700 or thereabouts: <[EMAIL PROTECTED]> [2006-05-01 19:31]: > On 2006-05-01, cga2000 <[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:

Re: hiding lines

2006-05-01 Thread Yakov Lerner
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 t

RE: hiding lines

2006-05-01 Thread Suresh Govindachar
Yakov Lerner wondered: > But how do you remove #ifdef blocks? I mentioned piping because > there is ready utility, 'unifdef', that removes some or all of > #if blocks. Isn't there a way to do a multi-line substitution: :%s/^\s*#ifdef .*^\s*#endif// where the *s are multi-line a

Re: hiding lines

2006-05-01 Thread Yakov Lerner
On 5/2/06, Suresh Govindachar <[EMAIL PROTECTED]> wrote: Yakov Lerner wondered: > But how do you remove #ifdef blocks? I mentioned piping because > there is ready utility, 'unifdef', that removes some or all of > #if blocks. Isn't there a way to do a multi-line substitution: :%s/

Re: hiding lines

2006-05-01 Thread Tim Chase
What if #if/#endif blocks are nested ? Yakov is correct, that nested #if/#endif blocks would cause trouble. My first thought at a [100% untested] solution would be something like :g/^\s*#endif/norm dV% which would find all of the #endif tokens and delete their associated blocks, exploiti

RE: hiding lines

2006-05-01 Thread Suresh Govindachar
On May 01, 2006, Yakov Lerner pointed out: >On 5/2/06, Suresh Govindachar wrote: >> >> Yakov Lerner wondered: >> >>> But how do you remove #ifdef blocks? I mentioned piping >>> because there is ready utility, 'unifdef', that removes some >>> or all of #if blocks. >> >> I

RE: hiding lines

2006-05-01 Thread Suresh Govindachar
[In reporting the third solution below, I forgot the g] On May 01, 2006, Yakov Lerner pointed out: >On 5/2/06, Suresh Govindachar wrote: >> >> Yakov Lerner wondered: >> >>> But how do you remove #ifdef blocks? I mentioned piping >>> because there is ready utility, 'unifdef', t

RE: hiding lines

2006-05-01 Thread Suresh Govindachar
[Modified the third solution] On May 01, 2006, Yakov Lerner pointed out: >On 5/2/06, Suresh Govindachar wrote: >> >> Yakov Lerner wondered: >> >>> But how do you remove #ifdef blocks? I mentioned piping >>> because there is ready utility, 'unifdef', that removes some >>> or al

Re: hiding lines

2006-05-04 Thread Jack Donohue
:v (and :g) made my day..! Yes, I use this a lot if I just want to filter out a set of lines, or see only lines containing some text (like the old XEDIT command). But what I'd really like to to is continue editing in this view and not lose all the hidden lines, more like folding. I expect f

Re: hiding lines

2006-05-04 Thread Gerald Lai
On Thu, 4 May 2006, Jack Donohue wrote: :v (and :g) made my day..! Yes, I use this a lot if I just want to filter out a set of lines, or see only lines containing some text (like the old XEDIT command). But what I'd really like to to is continue editing in this view and not lose all the hi

RE: hiding lines

2006-05-04 Thread Suresh Govindachar
t; I guess I'm looking for a g or v command that folds the lines > instead of actually deleting them. The original post specifically asked for a non-fold based solution to "hiding lines". The first step toward finding a non-"cumbersome" solution that can be mapp

Re: hiding lines

2006-05-04 Thread Gary Johnson
On 2006-05-04, Jack Donohue <[EMAIL PROTECTED]> wrote: > > :v (and :g) made my day..! > > Yes, I use this a lot if I just want to filter out a set of lines, or see > only lines containing some text (like the old XEDIT command). But what I'd > really like to to is continue editing in this view a

Re: hiding lines

2006-05-05 Thread Charles E Campbell Jr
Suresh Govindachar wrote: Jack Donohue wrote: >> :v (and :g) made my day..! > > I guess I'm looking for a g or v command that folds the lines > instead of actually deleting them. The original post specifically asked for a non-fold based solution to "hiding

Re: Hiding lines

2006-09-17 Thread Alan G Isaac
It rather sounds like you want THE's 'all' command: http://hessling-editor.sourceforge.net/doc/comm/ALL.html I think the view expressed on this list in the past is something like: see :h :global I am not claiming this is a complete response. Indeed, I believe your request interacts with anot

Re: Hiding lines

2006-09-17 Thread Tim Chase
One could hide lines matching or !matching a certain pattern. Any further edit actions were only executed with the visible lines as target. Regardless what you were doing -- only the visible lines were affected. You had to give the "unhide" command explicitely to return to "full text mode".

Re: Hiding lines

2006-09-17 Thread Meino Christian Cramer
From: Tim Chase <[EMAIL PROTECTED]> Subject: Re: Hiding lines Date: Sun, 17 Sep 2006 11:15:13 -0500 > > One could hide lines matching or !matching a certain pattern. Any > > further edit actions were only executed with the visible lines as > > target. Regardless what yo

Re: Hiding lines

2006-09-17 Thread Tim Chase
thank you for your explanations ! :O) Well, I'll see what I can do to help further...or create a headache for you, as what follows is rather hackish. :) With "protected" I mean the effect of doing as follows (but I mean the result only ... not the way which leads to it...) There is a te

Re: Hiding lines

2006-09-17 Thread Yakov Lerner
On 9/17/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote: Hi, a few years ago I had to edit text files on a big iron (IBM) and a OS called "TCO" or such. The editor was [CENSORED] but there was one feature I miss since then: One could hide lines matching or !matching a certain pattern

Re: Hiding lines

2006-09-17 Thread Hari Krishna Dara
On Sun, 17 Sep 2006 at 9:03pm, Yakov Lerner wrote: > On 9/17/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote: > > Hi, > > > > a few years ago I had to edit text files on a big iron (IBM) and a OS > > called "TCO" or such. > > > > The editor was [CENSORED] but there was one feature I miss

Re: Hiding lines

2006-09-17 Thread Hari Krishna Dara
On Sun, 17 Sep 2006 at 7:17pm, Meino Christian Cramer wrote: > From: Tim Chase <[EMAIL PROTECTED]> > Subject: Re: Hiding lines > Date: Sun, 17 Sep 2006 11:15:13 -0500 > > > > One could hide lines matching or !matching a certain pattern. Any > > > further

Re: Hiding lines

2006-09-17 Thread Tim Chase
Tim gave you the solution (:foldd). But I think there is one small problem with operating on non-folded lines; not with Tim's solution but with folding in general. Namely, you cannot fold single line. I remembered this after I got back Meino's reply detailing what he wanted to do. Fortunate

Re: Hiding lines

2006-09-17 Thread Tim Chase
Tim's :foldd and :foldo suggestions are actually very good in deed (didn't know about them), especially with the help of tools to create folds and operate commands on them. I would like to suggest you take a look at my foldutil.vim (http://www.vim.org/script.php?script_id=158). I only learned ab

Re: Hiding lines

2006-09-17 Thread Meino Christian Cramer
Hi, thank you *very* much that many input !!! :) I havent understood all the stuff right now - I am still catched in the read-install-test/check-reread cycle : As soon as the mist has lifted for me, I will post again. :O) Keep hacking! mcc

Re: Hiding lines

2006-09-18 Thread Meino Christian Cramer
From: Hari Krishna Dara <[EMAIL PROTECTED]> Subject: Re: Hiding lines Date: Sun, 17 Sep 2006 14:05:38 -0700 (PDT) > > On Sun, 17 Sep 2006 at 7:17pm, Meino Christian Cramer wrote: > > > From: Tim Chase <[EMAIL PROTECTED]> > > Subject: Re: Hiding lines > >

Re: Hiding lines

2006-09-18 Thread Hari Krishna Dara
On Mon, 18 Sep 2006 at 8:01pm, Meino Christian Cramer wrote: > > > > Tim's :foldd and :foldo suggestions are actually very good in deed > > (didn't know about them), especially with the help of tools to create > > folds and operate commands on them. I would like to suggest you take a > > look at m

Re: Hiding lines

2006-09-18 Thread Meino Christian Cramer
From: Hari Krishna Dara <[EMAIL PROTECTED]> Subject: Re: Hiding lines Date: Mon, 18 Sep 2006 17:48:42 -0700 (PDT) > > On Mon, 18 Sep 2006 at 8:01pm, Meino Christian Cramer wrote: > > > > > > Tim's :foldd and :foldo suggestions are actually very good in

Re: Hiding lines

2006-09-19 Thread Christian MICHON
Interesting discussion. Wouldn't it be easier to: 1st: fold the lines you do not want to see 2nd: conceal all folded lines (using conceal patch) I know how to do the 1st point, how can I go around the 2nd, knowing conceal is mostly a syntax add-on ? Keep vimming! Christian

lines folding by pattern ; was Re: hiding lines

2006-05-04 Thread Yakov Lerner
On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: > :v (and :g) made my day..! Yes, I use this a lot if I just want to filter out a set of lines, or see only lines containing some text (like the old XEDIT command). But what I'd really like to to is continue editing in this view and not lose al

Re: lines folding by pattern ; was Re: hiding lines

2006-05-04 Thread Hari Krishna Dara
On Thu, 4 May 2006 at 8:54pm, Yakov Lerner wrote: > On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: > > > :v (and :g) made my day..! > > > > Yes, I use this a lot if I just want to filter out a set of lines, or see > > only lines containing some text (like the old XEDIT command). But what I'd

Re: lines folding by pattern ; was Re: hiding lines

2006-05-06 Thread Bill Pursell
Yakov Lerner wrote: On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: > :v (and :g) made my day..! Yes, I use this a lot if I just want to filter out a set of lines, or see only lines containing some text (like the old XEDIT command). But what I'd really like to to is continue editing in t

Re: lines folding by pattern ; was Re: hiding lines

2006-05-06 Thread Yakov Lerner
On 5/6/06, Bill Pursell <[EMAIL PROTECTED]> wrote: Yakov Lerner wrote: > On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: > >> > :v (and :g) made my day..! >> >> Yes, I use this a lot if I just want to filter out a set of lines, or see >> only lines containing some text (like the old XEDIT comm

Re: lines folding by pattern ; was Re: hiding lines

2006-05-06 Thread Bill Pursell
Yakov Lerner wrote: On 5/6/06, Bill Pursell <[EMAIL PROTECTED]> wrote: Yakov Lerner wrote: > On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: > >> > :v (and :g) made my day..! >> >> Yes, I use this a lot if I just want to filter out a set of lines, or see >> only lines containing some text

Re: lines folding by pattern ; was Re: hiding lines

2006-05-07 Thread Yakov Lerner
On 5/7/06, Bill Pursell <[EMAIL PROTECTED]> wrote: Yakov Lerner wrote: > On 5/6/06, Bill Pursell <[EMAIL PROTECTED]> wrote: > >> Yakov Lerner wrote: >> > On 5/4/06, Jack Donohue <[EMAIL PROTECTED]> wrote: >> > >> >> > :v (and :g) made my day..! >> >> >> >> Yes, I use this a lot if I just want to