Christian Brabandt wrote:
> On Mo, 29 Dez 2014, Gary Johnson wrote:
>
> > On 2014-12-29, Kevin Wu wrote:
> > > Gary Johnson於 2014年12月30日星期二UTC+8上午3時30分04秒寫道:
> > > > On 2014-12-28, Kevin Wu wrote:
> > > > > When I do searching, the cursor would jump to the first match, if
> > > > > I set "incsearch".
> > > > > But it's not true with folded context.
> > > > > Specifically speaking, What I want to get is that when searching,
> > > > > the folded context would be unfold automatically and the cursor
> > > > > would jump into where the first match is, and moreover when the
> > > > > cursor jump to another line, the unfolded context would be folded
> > > > > again.
> > > > >
> > > > > Is there any way to satisfy my need?
> > > >
> > > > Take a look at
> > > >
> > > > :help 'foldopen'
> > > > :help 'foldclose'
> > > >
> > > > Regards,
> > > > Gary
> > >
> > > Hi Gary,
> > >
> > > When I searched the solution for my issue, I found the option
> > > 'foldopen', and I also had checked it, which is
> > > :se fdo?
> > > foldopen=block,hor,mark,percent,quickfix,search,tag,undo
> > > Is it OK?
> > >
> > > Sorry, it's my poor English to let you misunderstand my issue.
> > > After finishing a search, the cursor will jump to the first match,
> > > even it's in the fold, that is OK.
> > > But what I want is "incremental" search, that is, when I typing
> > > the word a character by character, the cursor would jump into the
> > > corresponding match instantly with automatically folding and
> > > unfolding.
> > > If I set "incsearch" and no fold here, everything is fine.
> > > But if the 1st match is in a fold, there is no window responding,
> > > just like "noincsearch".
> > >
> > > Is there a way to satisfy my need?
> > >
> > > Regards,
> > > Kevin
> >
> > Hi Kevin,
> >
> > You explained your issue well. The fault is mine. I thought that
> > including "search" in 'foldopen' and setting 'foldclose' to "all"
> > might do what you wanted, or be close enough, but I didn't try it
> > before replying and I see now that it doesn't work for incremental
> > searches. Odd. It seems to me that it should. I don't know of a
> > way to do that.
>
> Here is a patch, that will do that, if the foldopen option contains
> 'search'
Problem is that while typing this will open lots of folds before the one
you actually want to see. Temporarily opening one fold would be better,
but might be a bit difficult to implement. Perhaps forcing the line
with the match to be displayed even when the fold is actually closed
might work.
--
hundred-and-one symptoms of being an internet addict:
33. You name your children Eudora, Mozilla and Dotcom.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment