Permalink
Browse files

merged in changes.

  • Loading branch information...
2 parents fcefb4d + deb02ca commit d7324d99dafe5e14c24dbf1f35dfba29fc0fffe1 @dogeared committed Dec 29, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 vimrc
View
13 vimrc
@@ -41,6 +41,19 @@ Bundle 'cucumber.zip'
" Clojure
Bundle 'VimClojure'
+" Javascript folding
+function! JavaScriptFold()
+ setl foldmethod=syntax
+ setl foldlevelstart=1
+ syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
+
+ function! FoldText()
+ return substitute(getline(v:foldstart), '{.*', '{...}', '')
+ endfunction
+ setl foldtext=FoldText()
+endfunction
+au FileType javascript call JavaScriptFold()
+
set ar
set expandtab
set hid

0 comments on commit d7324d9

Please sign in to comment.