From 72f6783e3143f2d3ba4404a81167f01b6e6bcdc9 Mon Sep 17 00:00:00 2001 From: frace Date: Mon, 25 Mar 2013 04:04:21 +0100 Subject: [PATCH] Added option g:indentLine_first_char Show a custom character by defining g:indentLine_first_char for g:indentLine_showFirstIndentLevel --- after/plugin/indentLine.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 614fd48..51a2fd7 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -11,12 +11,20 @@ if !has("conceal") || exists("g:indentLine_loaded") endif let g:indentLine_loaded = 1 -" | ¦ ┆ │ +" | ¦ ┆ ┊ │ if !exists("g:indentLine_char") if &encoding ==? "utf-8" let g:indentLine_char = "¦" else - let g:indentLine_char = "|" + let g:indentLine_char = "|" + endif +endif + +if !exists("g:indentLine_first_char") + if &encoding ==? "utf-8" + let g:indentLine_first_char = "¦" + else + let g:indentLine_first_char = "|" endif endif @@ -75,7 +83,7 @@ function! SetIndentLine() let space = &l:shiftwidth if g:indentLine_showFirstIndentLevel - exec 'syn match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_char + exec 'syn match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char endif for i in range(space+1, space * g:indentLine_indentLevel + 1, space)