folding at squiggly brace level (javascript)

classic Classic list List threaded Threaded
3 messages Options
kae
Reply | Threaded
Open this post in threaded view
|

folding at squiggly brace level (javascript)

kae
Hi guys,
   with vim 6.3, I was able to nest folds using '{' and '}' as the delimiters
(as seen here:
http://verens.com/archives/2005/04/18/using-javascript-folds-in-vim/)

Unfortunately, 6.4 doesn't like my attempts to do so. I can get it to fold
after function([^{]*){ matches, but that's it.

Can anyone help with this?

Kae
Reply | Threaded
Open this post in threaded view
|

Re: folding at squiggly brace level (javascript)

Gerald Lai-2
On Fri, 19 May 2006, Kae Verens wrote:

> Hi guys,
>  with vim 6.3, I was able to nest folds using '{' and '}' as the delimiters
> (as seen here:
> http://verens.com/archives/2005/04/18/using-javascript-folds-in-vim/)
>
> Unfortunately, 6.4 doesn't like my attempts to do so. I can get it to fold
> after function([^{]*){ matches, but that's it.
>
> Can anyone help with this?

If you're just interested in folding { }, you could try:

   :set foldmarker={,}
   :set foldmethod=marker

HTH.
--
Gerald
kae
Reply | Threaded
Open this post in threaded view
|

Re: folding at squiggly brace level (javascript)

kae
Gerald Lai wrote:

> On Fri, 19 May 2006, Kae Verens wrote:
>
>> Hi guys,
>>  with vim 6.3, I was able to nest folds using '{' and '}' as the
>> delimiters (as seen here:
>> http://verens.com/archives/2005/04/18/using-javascript-folds-in-vim/)
>>
>> Unfortunately, 6.4 doesn't like my attempts to do so. I can get it to
>> fold after function([^{]*){ matches, but that's it.
>>
>> Can anyone help with this?
>
> If you're just interested in folding { }, you could try:
>
>   :set foldmarker={,}
>   :set foldmethod=marker


thank you. Perfect.

Kae