Skip to content

Commit

Permalink
Fix issue Yggdroot#21
Browse files Browse the repository at this point in the history
  • Loading branch information
padde committed Mar 14, 2013
1 parent f14d7e6 commit e7d124c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions after/plugin/indentLine.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 /^ / 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
Expand Down
6 changes: 6 additions & 0 deletions doc/indentLine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e7d124c

Please sign in to comment.