On Tue, 19 Jan 2010, Matt Wozniski wrote:

> On Tue, Jan 19, 2010 at 8:01 PM, Benjamin R. Haskell wrote:
> > Using this following minimal example, with foldmethod=marker:
> >
> > $ cat foldtest.txt
> > {{{
> > }}}
> >
> > If I close the fold on the last character of a line, 'l' will not 
> > open the fold.
> 
> This is by design, l only opens the fold if the cursor moves within 
> the fold, and l doesn't move the cursor when it's already at EOL.

Hmm.  Okay, I kind of thought as much, but it seemed counterintuitive.

> > [...]
> >
> > Is there some way to get the auto-opening via 'l'-motion that I'm 
> > looking for?  I much prefer simply 'l'-ing into the fold as I'm 
> > browsing the file, rather than typing 'zo'.
> 
> Well, if it's only l and h you want, this should do the trick:
> 
>     :nnoremap l zvl
>     :nnoremap h zvh
> 
> zv unfolds as much as necessary to make the line containing the cursor 
> be completely unfolded.

That'll do, I s'pose.

Thanks much,
Ben

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to