From fc6584136a16ad5f76bf7c8fde1689869c721485 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Thu, 14 Jan 2016 22:30:25 +0900 Subject: [PATCH] Fix indendLine doesn't work with 'syntax' option change --- after/plugin/indentLine.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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