See https://github.com/jelera/vim-javascript-syntax for the full README. To enable curly braces folding, use the following: let g:javaScript_fold=1