www.ShoppingPodder.com

Leading Computer Shopping,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

Navigating search matches past folds
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Editors  
View previous topic :: View next topic  
Author Message
Guest







PostPosted: Thu Oct 09, 2008 2:43 am    Post subject: Navigating search matches past folds Reply with quote

I am using vim 7.x, console version, running over Linux.

I am making good use of folds to ignore unimportant data. If I search
for /pattern/ in a file with folds, the search itself leaves the folds
closed. But as I navigate the matches with "n", a fold will open
automatically if the next match is inside. In my present task, I
really want to ignore the data inside folds completely. Is there some
way to do either of the following?

1) tell / to match only in unfolded lines.

or

2) tell "n" to skip over folds?

Thanks for your help.

Lou
Back to top
John Beckett
Guest






PostPosted: Mon Oct 13, 2008 3:08 pm    Post subject: Re: Navigating search matches past folds Reply with quote

lbova99@yahoo.com wrote:
Quote:
I am using vim 7.x, console version, running over Linux.
1) tell / to match only in unfolded lines.

Good question. All I know is that there is a tip on this:
http://vim.wikia.com/wiki/Search_only_in_unfolded_text

If you get it working, please reply with the good news for my
interest.

John
Back to top
Ben C
Guest






PostPosted: Mon Oct 13, 2008 6:49 pm    Post subject: Re: Navigating search matches past folds Reply with quote

On 2008-10-13, John Beckett <nomail@thanks.junk> wrote:
Quote:
lbova99@yahoo.com wrote:
I am using vim 7.x, console version, running over Linux.
1) tell / to match only in unfolded lines.

Good question. All I know is that there is a tip on this:
http://vim.wikia.com/wiki/Search_only_in_unfolded_text

If you get it working, please reply with the good news for my
interest.

I just have

set foldopen-=search

in my .vimrc.
Back to top
John Beckett
Guest






PostPosted: Tue Oct 14, 2008 2:31 am    Post subject: Re: Navigating search matches past folds Reply with quote

Ben C wrote:
Quote:
set foldopen-=search

Live and learn ... thanks. I guess I'll have to update the tip.

With the above, search stops once per fold (if the search target
occurs one or more times in the fold). The fold is not opened. That
works rather well.

John
Back to top
Guest







PostPosted: Thu Oct 16, 2008 1:45 am    Post subject: Re: Navigating search matches past folds // Thank you both! Reply with quote

On Oct 13, 5:31 pm, John Beckett <nom...@thanks.junk> wrote:
Quote:
Ben C wrote:
set foldopen-=search

Live and learn ... thanks. I guess I'll have to update the tip.

With the above, search stops once per fold (if the search target
occurs one or more times in the fold). The fold is not opened. That
works rather well.

John


A great time saver and headache avoider.
Back to top
Display posts from previous:   
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Editors  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum