Skip to content

Add 'of' keyword and highlight links for template strings #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ syntax keyword javaScriptMessage alert confirm prompt status
syntax keyword javaScriptGlobal self top parent
syntax keyword javaScriptDeprecated escape unescape all applets alinkColor bgColor fgColor linkColor vlinkColor xmlEncoding
syntax keyword javaScriptConditional if else switch
syntax keyword javaScriptRepeat do while for in
syntax keyword javaScriptRepeat do while for in of
syntax keyword javaScriptBranch break continue
syntax keyword javaScriptLabel case default
syntax keyword javaScriptPrototype prototype
Expand Down Expand Up @@ -183,7 +183,7 @@ syntax match javaScriptOpSymbols "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\
syntax match javaScriptEndColons "[;,]"
syntax match javaScriptLogicSymbols "\(&&\)\|\(||\)"
"}}}
" ES6 String Interpolation
" ES6 String Interpolation {{{
syntax match javaScriptTemplateDelim "\${\|}" contained
syntax region javaScriptTemplateVar start=+${+ end=+}+ contains=javaScriptTemplateDelim keepend
syntax region javaScriptTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=javaScriptTemplateVar,javaScriptSpecial keepend
Expand Down Expand Up @@ -213,6 +213,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
HiLink javaScriptLogicSymbols Boolean
HiLink javaScriptBraces Function
HiLink javaScriptParens Operator
HiLink javaScriptTemplateDelim Operator

HiLink javaScriptComment Comment
HiLink javaScriptLineComment Comment
Expand All @@ -225,6 +226,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")

HiLink javaScriptString String
HiLink javaScriptRegexpString String
HiLink javaScriptTemplateString String

HiLink javaScriptNumber Number
HiLink javaScriptFloat Number
Expand Down