From 428adbd3d9596061264e69324510a3282ca7c77f Mon Sep 17 00:00:00 2001 From: charlesswartz Date: Sat, 5 Apr 2014 18:15:06 -0400 Subject: [PATCH] Keep default conceal values for excluded files Setup will now check if the file is part of the included or excluded filetypes before changing the conceal values. --- after/plugin/indentLine.vim | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 68ef068..4b4021c 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -105,9 +105,23 @@ endfunction "{{{1 function! s:Setup() function! s:Setup() - if ! exists("g:indentLine_noConcealCursor") - setlocal concealcursor=inc - endif + if index(g:indentLine_fileTypeExclude, &filetype) isnot -1 + return + endif + + if len(g:indentLine_fileType) isnot 0 && index(g:indentLine_fileType, &filetype) is -1 + return + end + + for name in g:indentLine_bufNameExclude + if matchstr(bufname(''), name) is bufname('') + return + endif + endfor + + if ! exists("g:indentLine_noConcealCursor") + setlocal concealcursor=inc + endif setlocal conceallevel=2 if !&hidden || !exists("b:indentLine_set") @@ -117,20 +131,6 @@ function! s:Setup() call s:InitColor() endif - if index(g:indentLine_fileTypeExclude, &filetype) isnot -1 - return - endif - - if len(g:indentLine_fileType) isnot 0 && index(g:indentLine_fileType, &filetype) is -1 - return - end - - for name in g:indentLine_bufNameExclude - if matchstr(bufname(''), name) is bufname('') - return - endif - endfor - if ! exists("b:indentLine_enabled") let b:indentLine_enabled = g:indentLine_enabled endif