mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-09 22:25:12 +08:00
refact: improve code
This commit is contained in:
@@ -7,15 +7,15 @@ syntax match VueValue contains=VueInject contained '\v\"\zs[^"]*\ze\"'
|
|||||||
syntax match VueInject contained '\v\$\w*'
|
syntax match VueInject contained '\v\$\w*'
|
||||||
|
|
||||||
syntax region VueExpression
|
syntax region VueExpression
|
||||||
\ containedin=vueTemplate,vueValue,htmlString
|
\ containedin=html.*
|
||||||
\ matchgroup=VueBrace
|
\ matchgroup=VueBrace
|
||||||
|
\ transparent
|
||||||
\ start="{{"
|
\ start="{{"
|
||||||
\ end="}}"
|
\ end="}}"
|
||||||
|
|
||||||
syntax region VueExpression
|
syntax region VueExpression
|
||||||
\ containedin=htmlItalic
|
\ containedin=vueTemplate,vueValue,htmlString
|
||||||
\ matchgroup=VueBrace
|
\ matchgroup=VueBrace
|
||||||
\ transparent
|
|
||||||
\ start="{{"
|
\ start="{{"
|
||||||
\ end="}}"
|
\ end="}}"
|
||||||
|
|
||||||
|
|||||||
@@ -41,9 +41,10 @@ endfunction
|
|||||||
|
|
||||||
function! s:LoadDefaultSyntax(group, type)
|
function! s:LoadDefaultSyntax(group, type)
|
||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
execute 'syntax include '.a:group.' $VIMRUNTIME/syntax/'.a:type.'.vim'
|
let syntaxPaths = ['$VIMRUNTIME', '$VIM/vimfiles', '$HOME/.vim']
|
||||||
execute 'silent! syntax include '.a:group.' $VIM/vimfiles/syntax/'.a:type.'.vim'
|
for path in syntaxPaths
|
||||||
execute 'silent! syntax include '.a:group.' $HOME/.vim/syntax/'.a:type.'.vim'
|
execute 'silent! syntax include '.a:group.' '.path.'/syntax/'.a:type.'.vim'
|
||||||
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:LoadFullSyntax(group, type)
|
function! s:LoadFullSyntax(group, type)
|
||||||
|
|||||||
Reference in New Issue
Block a user