diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 783cea2..614fd48 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -36,6 +36,10 @@ if !exists("g:indentLine_fileTypeExclude") let g:indentLine_fileTypeExclude = [] endif +if !exists("g:indentLine_showFirstIndentLevel") + let g:indentLine_showFirstIndentLevel = 0 +endif + set conceallevel=1 set concealcursor=inc @@ -69,6 +73,11 @@ endfunction function! SetIndentLine() let b:indentLine_enabled = 1 let space = &l:shiftwidth + + if g:indentLine_showFirstIndentLevel + exec 'syn match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_char + endif + for i in range(space+1, space * g:indentLine_indentLevel + 1, space) exec 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char endfor diff --git a/doc/indentLine.txt b/doc/indentLine.txt index 0be7b0a..aab8b9c 100644 --- a/doc/indentLine.txt +++ b/doc/indentLine.txt @@ -45,6 +45,12 @@ g:indentLine_indentLevel *g:indentLine_indentLevel* 10. Default value is 10. +g:indentLine_showFirstIndentLevel *g:indentLine_showFirstIndentLevel* + Specify whether the first indent level should be shown. + This is useful if you use indentLine in comination with + |listchars| in order to show tabs. + Default value is 0. + g:indentLine_enabled *g:indentLine_enabled* Specify whether to enable indentLine plugin by default. If value is not 0, the plugin is on by default, otherwise off.