On Wed, Jan 20, 2010 at 5:12 AM, Andy Wokula wrote: > Am 20.01.2010 02:19, schrieb Benjamin R. Haskell: >> >> On Tue, 19 Jan 2010, Matt Wozniski wrote: >> >>> On Tue, Jan 19, 2010 at 8:01 PM, Benjamin R. Haskell wrote: >>>> >>>> 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 > > or > > nnoremap <expr> l foldclosed(".")==-1 ? "l" : "zv" > > pros: > - a count works > - no beep at EOL
Definitely an improvement. ~Matt
-- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php