mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-22 20:01:27 +08:00
trival bug fixed
if let g:indentLine_char = "┆", the encoding should be utf-8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
" Script Name: indentLine.vim
|
" Script Name: indentLine.vim
|
||||||
" Version: 1.0.1
|
" Version: 1.0.2
|
||||||
" Last Change: Dec 3, 2012
|
" Last Change: Dec 22, 2012
|
||||||
" Author: Yggdroot <archofortune@gmail.com>
|
" Author: Yggdroot <archofortune@gmail.com>
|
||||||
"
|
"
|
||||||
" Description: To show the indent line
|
" Description: To show the indent line
|
||||||
@@ -10,34 +10,40 @@ if !has("conceal") || exists("g:loaded_indentLine")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_indentLine = 1
|
let g:loaded_indentLine = 1
|
||||||
if !exists("g:indentLine_char")
|
if !exists("g:indentLine_char")
|
||||||
" | ┆ │
|
" | ¦ ┆ │
|
||||||
let g:indentLine_char = "┆"
|
let g:indentLine_char = "|"
|
||||||
endif
|
|
||||||
if !exists("g:indentLine_color_term")
|
|
||||||
if &bg =~? "light"
|
|
||||||
let g:indentLine_color_term = 238
|
|
||||||
else
|
|
||||||
let g:indentLine_color_term = 039
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if !exists("g:indentLine_color_gui")
|
|
||||||
if &bg =~? "light"
|
|
||||||
let g:indentLine_color_gui = "Grey"
|
|
||||||
else
|
|
||||||
let g:indentLine_color_gui = "Grey40"
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("g:indentLine_indentLevel")
|
if !exists("g:indentLine_indentLevel")
|
||||||
let g:indentLine_indentLevel = 10
|
let g:indentLine_indentLevel = 20
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set conceallevel=1
|
set conceallevel=1
|
||||||
set concealcursor=inc
|
set concealcursor=inc
|
||||||
|
|
||||||
function! <SID>InitColor()
|
function! <SID>InitColor()
|
||||||
exec "hi Conceal ctermfg=" . g:indentLine_color_term . " ctermbg=NONE cterm=bold" .
|
if !exists("g:indentLine_color_term")
|
||||||
\ " guifg=" . g:indentLine_color_gui . " guibg=NONE"
|
if &bg ==? "light"
|
||||||
|
let term_color = 238
|
||||||
|
else
|
||||||
|
let term_color = 039
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let term_color = g:indentLine_color_term
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists("g:indentLine_color_gui")
|
||||||
|
if &bg ==? "light"
|
||||||
|
let gui_color = "Grey"
|
||||||
|
else
|
||||||
|
let gui_color = "Grey40"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let gui_color = g:indentLine_color_gui
|
||||||
|
endif
|
||||||
|
|
||||||
|
exec "hi Conceal ctermfg=" . term_color . " ctermbg=NONE"
|
||||||
|
exec "hi Conceal guifg=" . gui_color . " guibg=NONE"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! <SID>SetIndentLine()
|
function! <SID>SetIndentLine()
|
||||||
|
|||||||
Reference in New Issue
Block a user