Skip to content

Commit e7b2c32

Browse files
committed
Merge pull request #61 from reedcwilson/highlight/templatestrings
Add 'of' keyword and highlight links for template strings
2 parents b93c210 + 180e893 commit e7b2c32

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

syntax/javascript.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ syntax keyword javaScriptMessage alert confirm prompt status
4444
syntax keyword javaScriptGlobal self top parent
4545
syntax keyword javaScriptDeprecated escape unescape all applets alinkColor bgColor fgColor linkColor vlinkColor xmlEncoding
4646
syntax keyword javaScriptConditional if else switch
47-
syntax keyword javaScriptRepeat do while for in
47+
syntax keyword javaScriptRepeat do while for in of
4848
syntax keyword javaScriptBranch break continue
4949
syntax keyword javaScriptLabel case default
5050
syntax keyword javaScriptPrototype prototype
@@ -183,7 +183,7 @@ syntax match javaScriptOpSymbols "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\
183183
syntax match javaScriptEndColons "[;,]"
184184
syntax match javaScriptLogicSymbols "\(&&\)\|\(||\)"
185185
"}}}
186-
" ES6 String Interpolation
186+
" ES6 String Interpolation {{{
187187
syntax match javaScriptTemplateDelim "\${\|}" contained
188188
syntax region javaScriptTemplateVar start=+${+ end=+}+ contains=javaScriptTemplateDelim keepend
189189
syntax region javaScriptTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=javaScriptTemplateVar,javaScriptSpecial keepend
@@ -213,6 +213,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
213213
HiLink javaScriptLogicSymbols Boolean
214214
HiLink javaScriptBraces Function
215215
HiLink javaScriptParens Operator
216+
HiLink javaScriptTemplateDelim Operator
216217

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

226227
HiLink javaScriptString String
227228
HiLink javaScriptRegexpString String
229+
HiLink javaScriptTemplateString String
228230

229231
HiLink javaScriptNumber Number
230232
HiLink javaScriptFloat Number

0 commit comments

Comments
 (0)