Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #22 from padde/show-first-indent-level
Browse files Browse the repository at this point in the history
Fix issue #21
  • Loading branch information
Yggdroot committed Mar 14, 2013
2 parents f14d7e6 + 48b6252 commit 6655863
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 /^ / 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
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 6655863

Please sign in to comment.