Tim Chase wrote:
>    :nnoremap <f4> :set foldmethod=expr 
> foldexpr=(getline(v:lnum)=~@/)?0:1 foldlevel=0<cr>

[though I prefer not to reply to myself...]
As an aside, it only works for single-line search patterns...for 
multi-line patterns it should fold subsequent lines, but at least 
leave the first-matching-line unfolded.

-tim




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

Reply via email to