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???
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to