Skip to content

Commit

Permalink
Merge pull request pangloss#21 from mando/master
Browse files Browse the repository at this point in the history
Fix for Syntax file adjusts folding settings issue
  • Loading branch information
Darrick Wiebe committed Jun 13, 2011
2 parents 91540f6 + 3178b33 commit e8d6e10
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,6 @@ if exists("b:javascript_fold")
syntax match javaScriptOpAssign /=\@<!=/ nextgroup=javaScriptFuncBlock skipwhite skipempty
syntax region javaScriptFuncName contained matchgroup=javaScriptFuncName start=/\%(\$\|\w\)*\s*(/ end=/)/ contains=javaScriptLineComment,javaScriptComment nextgroup=javaScriptFuncBlock skipwhite skipempty
syntax region javaScriptFuncBlock contained matchgroup=javaScriptFuncBlock start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock fold

if &l:filetype=='javascript' && !&diff
" Fold setting
" Redefine the foldtext (to show a JS function outline) and foldlevel
" only if the entire buffer is JavaScript, but not if JavaScript syntax
" is embedded in another syntax (e.g. HTML).
setlocal foldmethod=syntax
setlocal foldlevel=4
endif
else
syntax keyword javaScriptFunction function
setlocal foldmethod<
Expand Down

0 comments on commit e8d6e10

Please sign in to comment.