>>> To fold based on that definition, you can use >>> >>> :set foldmethod=expr >>> :set foldexpr=strlen(matchstr(getline(v:lnum),'^-*')) >>> >> Shouldn't the pattern be: '^--*'
Either pattern will work. Both will give an empty string and thus a zero foldlevel if there is no -. Ben. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
