From 92117af3bb46a9a2f4c450cc5173b7abea3511fc Mon Sep 17 00:00:00 2001 From: averted Date: Wed, 13 May 2015 16:16:47 -0400 Subject: [PATCH] Adding basic ES6 string interpolation --- syntax/javascript.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syntax/javascript.vim b/syntax/javascript.vim index aa0568f..d4f6a9c 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -182,6 +182,11 @@ syntax match javaScriptOpSymbols "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\ syntax match javaScriptEndColons "[;,]" syntax match javaScriptLogicSymbols "\(&&\)\|\(||\)" "}}} +" 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 +"}}} " JavaScriptFold Function {{{ function! JavaScriptFold()