mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-08 04:54:45 +08:00
make indentline char configurable
This commit is contained in:
@@ -17,6 +17,13 @@ For gvim, hi Conceal guifg=(color you like) guibg=NONE
|
|||||||
|
|
||||||
For vim, hi Conceal ctermfg=(color you like) ctermbg=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
|
## Screenshots
|
||||||
<img src="http://i.imgur.com/WQqhH.jpg" width="600" height="400" alt="" />
|
<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="" />
|
<img src="http://i.imgur.com/zhV1v.jpg" width="600" height="400" alt="" />
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ if !has("conceal") || exists("g:loaded_indentLine")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_indentLine = 1
|
let g:loaded_indentLine = 1
|
||||||
|
if !exists("g:indentLine_char")
|
||||||
|
" | ┆ │
|
||||||
|
let g:indentLine_char = "┆"
|
||||||
|
endif
|
||||||
|
|
||||||
set conceallevel=2
|
set conceallevel=2
|
||||||
set concealcursor=inc
|
set concealcursor=inc
|
||||||
@@ -24,8 +28,7 @@ endfunction
|
|||||||
|
|
||||||
function! <SID>SetIndentLine()
|
function! <SID>SetIndentLine()
|
||||||
for i in range(&shiftwidth+1, 100, &shiftwidth)
|
for i in range(&shiftwidth+1, 100, &shiftwidth)
|
||||||
" | ┆ │
|
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char
|
||||||
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=┆'
|
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user