Hi,

* Frank Schafer <[EMAIL PROTECTED]> [16/02/05 21:46]:
> Hi,
> 
> I've managed to use syntax folding for vim C/C++ files adding:
> 
> syn region CurlyFold start="{" end="}" transparent fold
> syn sync fromstart
> set foldmethod=syntax
> set fdc=1
> 
> to  /usr/share/vim/vim63/syntax/c.vim.
> 
> This will fold / unfold everything between '{' and '}'. 
> 
> This failes if I try to fold everything between '(' and ')', '[' and ']'
> '#if' and '#endif' too.
> 
> Does anyone know if it is possible to have more than one pair of fold
> region delimiters at a time?

It is possible, you will need to add something like containedin=ALL to 
the definition to make it work, since these will usually appear inside 
other regions.

Note that it is easier to experiment if you remove the 'transparent' 
part. Then you can also use the the line in ":help synID" to check what 
group is used for the character under the cursor.

HTH

> 
> Thanks in advance
> Frank
> 
> 
> 
> --
> gentoo-user@gentoo.org mailing list
> 

-- 
I love deadlines. I like the whooshing sound they make as they fly by. 
                                        -- Douglas Adams
    
    Moshe Kaminsky <[EMAIL PROTECTED]>
    Home: 08-9456841

Attachment: pgpWhy6nL8hb5.pgp
Description: PGP signature

Reply via email to