mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-06 12:14:25 +08:00
Fix issue #21
This commit is contained in:
@@ -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! <SID>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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user