From c510395f8af59303d05fc150fc7ecbc3e715602c Mon Sep 17 00:00:00 2001 From: NagatoPain Date: Thu, 20 Dec 2012 01:26:46 +0800 Subject: [PATCH] add option to specify indent level --- after/plugin/indentLine.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 20c792f..af943e9 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -28,6 +28,10 @@ if !exists("g:indentLine_color_gui") endif endif +if !exists("g:indentLine_indentLevel") + let g:indentLine_indentLevel = 10 +endif + set conceallevel=1 set concealcursor=inc @@ -37,8 +41,9 @@ function! InitColor() endfunction function! SetIndentLine() - for i in range(&l:shiftwidth+1, 100, &l:shiftwidth) - exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char + let space = &l:shiftwidth + 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 endfunction