Arco wrote: > I have created a syntax file for a new file type. Syntax highlighting > is working fine. > > Now I would like to enable folding for my Level1 and Level2 tags. > > Here is a simplified snipped from my <lang>.vim file: > > syntax match Level1Start /^# .*/ > syntax match Level1End /^---$/ > syntax match Level2Start /^##.*/ > syntax match Level2End /^xxx$/ > set foldenable > set foldmethod=syntax > > I'm having trouble getting folding to work. > > I have tried: > - putting 'fold' at the end of each 'syntax match' lines > (this didn't work) > - adding 'syn region myFold start=/# .*/ end=/^---$/ transparent > fold' > (this sort of worked, but it wiped out highlighting) > > How do I make folding work??? >
* folding applies to regions, not matches * regions control their highlighting. If a region should support other highlighting internally, then the region needs to "contain" those highlighting constructs. Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
