make indentline char configurable

This commit is contained in:
NagatoPain
2012-12-15 13:58:12 +08:00
parent c03508a678
commit 8ff780c424
2 changed files with 12 additions and 2 deletions

View File

@@ -17,6 +17,13 @@ For gvim, hi Conceal guifg=(color you like) guibg=NONE
For vim, hi Conceal ctermfg=(color you like) ctermbg=NONE
You can change indentline char by youself.
change this variable:
```vim
let g:indentLine_char = "│"
```
## Screenshots
<img src="http://i.imgur.com/WQqhH.jpg" width="600" height="400" alt="" />
<img src="http://i.imgur.com/zhV1v.jpg" width="600" height="400" alt="" />

View File

@@ -9,6 +9,10 @@ if !has("conceal") || exists("g:loaded_indentLine")
finish
endif
let g:loaded_indentLine = 1
if !exists("g:indentLine_char")
" | ┆ │
let g:indentLine_char = "┆"
endif
set conceallevel=2
set concealcursor=inc
@@ -24,8 +28,7 @@ endfunction
function! <SID>SetIndentLine()
for i in range(&shiftwidth+1, 100, &shiftwidth)
" | ┆ │
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=┆'
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char
endfor
endfunction