From 9984150cc9ff83a97f173dcbecf9a7a72a071ee4 Mon Sep 17 00:00:00 2001 From: yemai Date: Mon, 1 Jul 2019 12:14:25 +0800 Subject: [PATCH] fix: '-10' highlighting error caused by `syn iskeyword` --- syntax/vue.vim | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/syntax/vue.vim b/syntax/vue.vim index 30db71f..361a461 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -11,6 +11,7 @@ if exists("b:current_syntax") && b:current_syntax == 'vue' finish endif + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Config {{{ @@ -70,8 +71,8 @@ if hlexists('cssTagName') == 0 endif " Avoid overload -if hlexists('jsNoise') == 0 - call s:LoadSyntax('@jsAll', 'javascript') +if hlexists('javaScriptComment') == 0 + call s:LoadSyntax('@htmlJavaScript', 'javascript') endif "}}} @@ -101,6 +102,16 @@ endif " Syntax patch {{{ " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Patch 7.4.1142 +if has("patch-7.4-1142") + if has("win32") + syntax iskeyword @,48-57,_,128-167,224-235,$ + else + syntax iskeyword @,48-57,_,192-255,$ + endif +endif + + " Clear htmlHead that may cause highlighting out of bounds syntax clear htmlHead @@ -132,7 +143,7 @@ syntax region vueTemplatePug syntax region vueScript \ start=++ \ end=++ - \ keepend contains=@jsAll,jsImport,jsExport,vueTag + \ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag syntax region vueStyle \ start=++