mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 21:54:46 +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 region VueExpression
|
||||
\ containedin=vueTemplate,vueValue,htmlString
|
||||
\ containedin=html.*
|
||||
\ matchgroup=VueBrace
|
||||
\ transparent
|
||||
\ start="{{"
|
||||
\ end="}}"
|
||||
|
||||
syntax region VueExpression
|
||||
\ containedin=htmlItalic
|
||||
\ containedin=vueTemplate,vueValue,htmlString
|
||||
\ matchgroup=VueBrace
|
||||
\ transparent
|
||||
\ start="{{"
|
||||
\ end="}}"
|
||||
|
||||
|
||||
@@ -41,9 +41,10 @@ endfunction
|
||||
|
||||
function! s:LoadDefaultSyntax(group, type)
|
||||
unlet! b:current_syntax
|
||||
execute 'syntax include '.a:group.' $VIMRUNTIME/syntax/'.a:type.'.vim'
|
||||
execute 'silent! syntax include '.a:group.' $VIM/vimfiles/syntax/'.a:type.'.vim'
|
||||
execute 'silent! syntax include '.a:group.' $HOME/.vim/syntax/'.a:type.'.vim'
|
||||
let syntaxPaths = ['$VIMRUNTIME', '$VIM/vimfiles', '$HOME/.vim']
|
||||
for path in syntaxPaths
|
||||
execute 'silent! syntax include '.a:group.' '.path.'/syntax/'.a:type.'.vim'
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:LoadFullSyntax(group, type)
|
||||
|
||||
Reference in New Issue
Block a user