diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index aa88567..2843079 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -157,6 +157,11 @@ function! s:Setup() call s:InitColor() endif + call s:EnableFeature() +endfunction + +"{{{1 function! s:EnableFeature() +function! s:EnableFeature() abort if g:indentLine_enabled call s:IndentLinesEnable() endif @@ -199,7 +204,8 @@ endfunction augroup indentLine autocmd! autocmd BufWinEnter * call Setup() - autocmd BufRead,BufNewFile,ColorScheme,Syntax * call InitColor() + autocmd Syntax * unlet! b:indentLine_enabled | call EnableFeature() + autocmd BufRead,BufNewFile,ColorScheme * call InitColor() autocmd BufUnload * unlet! b:indentLine_enabled augroup END