From 4d31393b03b18b55e59ef96b91882f94fd75e6db Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Tue, 31 Jan 2023 17:29:23 +0800 Subject: [PATCH] Remove timer usage --- indent/vue.vim | 7 +------ syntax/vue.vim | 16 +--------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/indent/vue.vim b/indent/vue.vim index 04af881..5f3c60b 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -302,11 +302,6 @@ function! VimVuePluginIndentMain(...) call s:SetVueIndent() endfunction -let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test -if s:timer - call timer_start(200, 'VimVuePluginIndentMain') -else - call VimVuePluginIndentMain() -endif +call VimVuePluginIndentMain() let b:did_indent = 1 diff --git a/syntax/vue.vim b/syntax/vue.vim index 79f214a..4b624bc 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -202,27 +202,13 @@ function! s:SetExtraSyntax() call s:SetCurrentSyntax() endfunction -function! s:PostSetting() - if exists('s:main_timer') - unlet s:main_timer - endif -endfunction - function! VimVuePluginSyntaxMain(...) call s:Init() let syntax_list = vue#GetSyntaxList(s:config_syntax) call s:LoadSyntaxList(syntax_list) call s:SetBlockSyntax(s:config_syntax) call s:SetExtraSyntax() - call s:PostSetting() endfunction " Entry -let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test -if s:timer - if !exists('s:main_timer') - let s:main_timer = timer_start(1, 'VimVuePluginSyntaxMain') - endif -else - call VimVuePluginSyntaxMain() -endif +call VimVuePluginSyntaxMain()