excellent trick! (as usual)
thanks a lot!
On 6/5/06, Tim Chase [EMAIL PROTECTED] wrote:
and how do I do if I want it to be case insensitive ?
ie I want to detect Warning WARNING warning
:help expr-=~?
set foldmethod=expr foldexpr=getline(v:lnum)=~?'warning'?0:1
I also tried another
I would like to fold all lines not containing a keyword like
'warning'. Basically, I want to be able to open a file,
apply this filter and immediately see all warnings
related in my file.
:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'warning'?'1':1
You can learn more by reading at
Dnia poniedziaĆek, 5 czerwca 2006 13:51, Christian MICHON napisaĆ:
any help/hint appreciated. thanks in advance
Tim already gave folding solution but you may be also interested in:
:vimgrep /warning/ %
m.
ps. Vim7 required.