Merge pull request #22 from padde/show-first-indent-level

Fix issue #21
This commit is contained in:
Yggdroot
2013-03-14 07:47:26 -07:00
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -36,6 +36,10 @@ if !exists("g:indentLine_fileTypeExclude")
let g:indentLine_fileTypeExclude = [] let g:indentLine_fileTypeExclude = []
endif endif
if !exists("g:indentLine_showFirstIndentLevel")
let g:indentLine_showFirstIndentLevel = 0
endif
set conceallevel=1 set conceallevel=1
set concealcursor=inc set concealcursor=inc
@@ -69,6 +73,11 @@ endfunction
function! <SID>SetIndentLine() function! <SID>SetIndentLine()
let b:indentLine_enabled = 1 let b:indentLine_enabled = 1
let space = &l:shiftwidth 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) 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 exec 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char
endfor endfor
+6
View File
@@ -45,6 +45,12 @@ g:indentLine_indentLevel *g:indentLine_indentLevel*
10. 10.
Default value is 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* g:indentLine_enabled *g:indentLine_enabled*
Specify whether to enable indentLine plugin by default. Specify whether to enable indentLine plugin by default.
If value is not 0, the plugin is on by default, otherwise off. If value is not 0, the plugin is on by default, otherwise off.