Skip to content

Commit

Permalink
Merge pull request jelera#55 from larsbs/master
Browse files Browse the repository at this point in the history
Added support for object keys syntax highlighting
  • Loading branch information
jelera committed Jul 3, 2015
2 parents 8066c37 + 539dd14 commit e30ebd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ syntax match javaScriptFuncArg "\(([^()]*)\)" contains=javaScriptParen
syntax match javaScriptFuncComma /,/ contained
syntax match javaScriptFuncEq /=/ contained
syntax region javaScriptFuncDef start="\<function\>" end="\([^)]*\)" contains=javaScriptFuncKeyword,javaScriptFuncArg keepend
syntax match javaScriptObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\)\@=/ contains=javaScriptFunctionKey
syntax match javaScriptFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/ contained
"}}}
" Braces, Parens, symbols, colons {{{
syntax match javaScriptBraces "[{}\[\]]"
Expand Down

0 comments on commit e30ebd4

Please sign in to comment.