isRuslan/vim-es6

How to enable code folding?

heisian opened this issue · 0 comments

  • I see JavaScriptFold() in the source, however vim tells me No fold found when I type zc in a foldable block
  • If I add the following manually to my ~/.vimrc, it seems to work:
" From vim-es6 source:
setl foldmethod=syntax
setl foldlevelstart=1
syntax region foldBraces start=/{/ end=/}/ transparent fold keepend extend
  • How can I get folding to work without manually adding the above to ~/.vimrc?