diff options
Diffstat (limited to 'runtime/syntax/javascript.vim')
-rw-r--r-- | runtime/syntax/javascript.vim | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index ba8975bc9..b293eb806 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -7,7 +7,7 @@ " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members -" Last Change: 2006 Jun 19 +" Last Change: 2010 Mar 25 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -28,16 +28,14 @@ if version < 600 && exists("javaScript_fold") unlet javaScript_fold endif -syn case ignore - syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo syn match javaScriptSpecial "\\\d\d\d\|\\." -syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc -syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" @@ -51,7 +49,7 @@ syn keyword javaScriptType Array Boolean Date Function Number Object String Reg syn keyword javaScriptStatement return with syn keyword javaScriptBoolean true false syn keyword javaScriptNull null undefined -syn keyword javaScriptIdentifier arguments this var +syn keyword javaScriptIdentifier arguments this var let syn keyword javaScriptLabel case default syn keyword javaScriptException try catch finally throw syn keyword javaScriptMessage alert confirm prompt status @@ -61,7 +59,7 @@ syn keyword javaScriptDeprecated escape unescape syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile if exists("javaScript_fold") - syn match javaScriptFunction "\<function\>" + syn match javaScriptFunction "\<function\>" syn region javaScriptFunctionFold start="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend syn sync match javaScriptSync grouphere javaScriptFunctionFold "\<function\>" @@ -70,7 +68,7 @@ if exists("javaScript_fold") setlocal foldmethod=syntax setlocal foldtext=getline(v:foldstart) else - syn keyword javaScriptFunction function + syn keyword javaScriptFunction function syn match javaScriptBraces "[{}\[\]]" syn match javaScriptParens "[()]" endif |