Wednesday, May 25, 2011

Re: How To Emulate An ISPF Editor Feature in Vim

On Tue, 24 May 2011, Roy Fulbright wrote:
> I know this dates me, but back in the day I used to exclude all lines in
> the ISPF editor using X9999 and then use 'find' to display (unexclude)
> lines that matched the find criteria. I have been trying to do the same
> thing with Vim by folding all lines and searching, but my search unfolds
> all lines. Is there a way to search folded lines and have only matching
> lines unfolded?

one suggestion would be to construct a function to:

1) build your initial set of dynamic folds based upon your search criteria

2) move to first fold start

3) loop through:

a) find first fold exception
b) break the enclosing fold into two parts, one before the exception, one after the exception
3) move to next fold start

and appropriate help text is in :help usr_28
(that is the user manual section on folding.)

and i still have my ispf quick ref card squirreled away, somewhere...

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: