From 11c04aaf7bb78db799a2876618da4d6d2a3b57f3 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Thu, 1 Apr 2021 10:33:38 +0800 Subject: [PATCH] Fix no highlight after loading session --- indent/vue.vim | 6 ++++-- syntax/vue.vim | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indent/vue.vim b/indent/vue.vim index 04dfbca..90bab26 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -1,6 +1,6 @@ " Language: Vue " Maintainer: leaf -" CREDITS: Inspired by mxw/vim-jsx. +" Credits: Inspired by mxw/vim-jsx. if exists('b:did_indent') | finish |endif @@ -216,8 +216,10 @@ function! VimVuePluginIndentMain(...) call s:SetVueIndent() endfunction -if exists('*timer_start') && !s:test +if exists('*timer_start') && !exists('SessionLoad') && !s:test call timer_start(50, 'VimVuePluginIndentMain') else call VimVuePluginIndentMain() endif + +let b:did_indent = 1 diff --git a/syntax/vue.vim b/syntax/vue.vim index 45047f4..416dbc2 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -1,6 +1,6 @@ " Language: Vue " Maintainer: leaf -" CREDITS: Inspired by mxw/vim-jsx. +" Credits: Inspired by mxw/vim-jsx. if exists('b:current_syntax') && b:current_syntax == 'vue' finish @@ -167,7 +167,7 @@ function! VimVuePluginSyntaxMain(...) call s:HighlightVueTag() endfunction -if exists('*timer_start') && !s:test +if exists('*timer_start') && !exists('SessionLoad') && !s:test call timer_start(1, 'VimVuePluginSyntaxMain') else call VimVuePluginSyntaxMain()