mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-16 16:57:10 +08:00
add option to specify indent level
This commit is contained in:
@@ -28,6 +28,10 @@ if !exists("g:indentLine_color_gui")
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:indentLine_indentLevel")
|
||||||
|
let g:indentLine_indentLevel = 10
|
||||||
|
endif
|
||||||
|
|
||||||
set conceallevel=1
|
set conceallevel=1
|
||||||
set concealcursor=inc
|
set concealcursor=inc
|
||||||
|
|
||||||
@@ -37,8 +41,9 @@ function! <SID>InitColor()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! <SID>SetIndentLine()
|
function! <SID>SetIndentLine()
|
||||||
for i in range(&l:shiftwidth+1, 100, &l:shiftwidth)
|
let space = &l:shiftwidth
|
||||||
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char
|
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
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user