mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 05:34:44 +08:00
Fix no highlight after loading session
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
" Language: Vue
|
" Language: Vue
|
||||||
" Maintainer: leaf <https://github.com/leafOfTree>
|
" Maintainer: leaf <https://github.com/leafOfTree>
|
||||||
" CREDITS: Inspired by mxw/vim-jsx.
|
" Credits: Inspired by mxw/vim-jsx.
|
||||||
|
|
||||||
if exists('b:did_indent') | finish |endif
|
if exists('b:did_indent') | finish |endif
|
||||||
|
|
||||||
@@ -216,8 +216,10 @@ function! VimVuePluginIndentMain(...)
|
|||||||
call s:SetVueIndent()
|
call s:SetVueIndent()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists('*timer_start') && !s:test
|
if exists('*timer_start') && !exists('SessionLoad') && !s:test
|
||||||
call timer_start(50, 'VimVuePluginIndentMain')
|
call timer_start(50, 'VimVuePluginIndentMain')
|
||||||
else
|
else
|
||||||
call VimVuePluginIndentMain()
|
call VimVuePluginIndentMain()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let b:did_indent = 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
" Language: Vue
|
" Language: Vue
|
||||||
" Maintainer: leaf <https://github.com/leafOfTree>
|
" Maintainer: leaf <https://github.com/leafOfTree>
|
||||||
" CREDITS: Inspired by mxw/vim-jsx.
|
" Credits: Inspired by mxw/vim-jsx.
|
||||||
|
|
||||||
if exists('b:current_syntax') && b:current_syntax == 'vue'
|
if exists('b:current_syntax') && b:current_syntax == 'vue'
|
||||||
finish
|
finish
|
||||||
@@ -167,7 +167,7 @@ function! VimVuePluginSyntaxMain(...)
|
|||||||
call s:HighlightVueTag()
|
call s:HighlightVueTag()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists('*timer_start') && !s:test
|
if exists('*timer_start') && !exists('SessionLoad') && !s:test
|
||||||
call timer_start(1, 'VimVuePluginSyntaxMain')
|
call timer_start(1, 'VimVuePluginSyntaxMain')
|
||||||
else
|
else
|
||||||
call VimVuePluginSyntaxMain()
|
call VimVuePluginSyntaxMain()
|
||||||
|
|||||||
Reference in New Issue
Block a user