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 approach of

set foldexpr=(match(getline(v:lnum),'warning\\c')+1)?0:1

which also seems to do the trick.

-tim




Reply via email to