Merge pull request #33 from tommcdo/master

Add word boundaries to "function" keyword
This commit is contained in:
Jose Elera
2013-11-13 09:01:43 -08:00

View File

@@ -172,11 +172,11 @@ endif
"}}} "}}}
" Function and arguments highlighting {{{ " Function and arguments highlighting {{{
syntax keyword javaScriptFuncKeyword function contained syntax keyword javaScriptFuncKeyword function contained
syntax region javascriptFuncExp start=/\w\+\s\==\s\=function/ end="\([^)]*\)" contains=javascriptFuncEq,javascriptFuncKeyword,javascriptFuncArg keepend syntax region javascriptFuncExp start=/\w\+\s\==\s\=function\>/ end="\([^)]*\)" contains=javascriptFuncEq,javascriptFuncKeyword,javascriptFuncArg keepend
syntax match javaScriptFuncArg "\(([^()]*)\)" contains=javaScriptParens,javaScriptFuncComma contained syntax match javaScriptFuncArg "\(([^()]*)\)" contains=javaScriptParens,javaScriptFuncComma contained
syntax match javaScriptFuncComma /,/ contained syntax match javaScriptFuncComma /,/ contained
syntax match javascriptFuncEq /=/ contained syntax match javascriptFuncEq /=/ contained
syntax region javaScriptFuncDef start="function" end="\([^)]*\)" contains=javaScriptFuncKeyword,javaScriptFuncArg keepend syntax region javaScriptFuncDef start="\<function\>" end="\([^)]*\)" contains=javaScriptFuncKeyword,javaScriptFuncArg keepend
"}}} "}}}
" Braces, Parens, symbols, colons {{{ " Braces, Parens, symbols, colons {{{
syn match javaScriptBraces "[{}\[\]]" syn match javaScriptBraces "[{}\[\]]"