Merge pull request #81 from xinleibird/master

mount none X that 16-colors tty (my ubuntu's Ctrl+Alt+F1)
This commit is contained in:
Yggdroot
2014-04-14 09:49:54 +08:00
3 changed files with 18 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ If you use a plugin manager you can put the whole directory into your `~/.vim/bu
You can change the color of indentLines: You can change the color of indentLines:
for Vim, set `g:indentLine_color_term` in your `.vimrc`, e.g. `let g:indentLine_color_term = 239`, for Vim, set `g:indentLine_color_term` in your `.vimrc`, e.g. `let g:indentLine_color_term = 239`,
for GVim, set `g:indentLine_color_gui` in your `.vimrc`, e.g. `let g:indentLine_color_gui = '#A4E57E'` for GVim, set `g:indentLine_color_gui` in your `.vimrc`, e.g. `let g:indentLine_color_gui = '#A4E57E'`
for none X terminal, set `g:indentLine_color_tty` in your `.vimrc`, e.g. `let g:indentLine_color_tty = 2
You can also change the indentLine char: You can also change the indentLine char:
for both Vim and GVim, set `let g:indentLine_char = 'c'` where `'c'` can be any ASCII character. You can also use one of `¦`, `` or `│` to display more beautiful lines. However, these characters will only work with files whose encoding is UTF-8. for both Vim and GVim, set `let g:indentLine_char = 'c'` where `'c'` can be any ASCII character. You can also use one of `¦`, `` or `│` to display more beautiful lines. However, these characters will only work with files whose encoding is UTF-8.

View File

@@ -14,8 +14,8 @@ endif
let g:indentLine_loaded = 1 let g:indentLine_loaded = 1
let g:indentLine_char = get(g:,'indentLine_char',(&encoding is# "utf-8" ? '¦' : '|')) let g:indentLine_char = get(g:,'indentLine_char',(&encoding is# "utf-8" && &term isnot# "linux" ? '¦' : '|'))
let g:indentLine_first_char = get(g:,'indentLine_first_char',(&encoding is# "utf-8" ? '¦' : '|')) let g:indentLine_first_char = get(g:,'indentLine_first_char',(&encoding is# "utf-8" && &term isnot# "linux" ? '¦' : '|'))
let g:indentLine_indentLevel = get(g:,'indentLine_indentLevel',10) let g:indentLine_indentLevel = get(g:,'indentLine_indentLevel',10)
let g:indentLine_enabled = get(g:,'indentLine_enabled',1) let g:indentLine_enabled = get(g:,'indentLine_enabled',1)
let g:indentLine_fileType = get(g:,'indentLine_fileType',[]) let g:indentLine_fileType = get(g:,'indentLine_fileType',[])
@@ -52,8 +52,19 @@ function! s:InitColor()
let gui_color = g:indentLine_color_gui let gui_color = g:indentLine_color_gui
endif endif
if ! exists("g:indentLine_color_tty")
if &background is# "light"
let tty_color = 4
else
let tty_color = 2
endif
else
let tty_color = g:indentLine_color_tty
endif
execute "highlight Conceal ctermfg=" . term_color . " ctermbg=NONE" execute "highlight Conceal ctermfg=" . term_color . " ctermbg=NONE"
execute "highlight Conceal guifg=" . gui_color . " guibg=NONE" execute "highlight Conceal guifg=" . gui_color . " guibg=NONE"
execute "highlight Conceal cterm=bold ctermfg=" . tty_color . " ctermbg=NONE"
endfunction endfunction
"{{{1 function! s:SetIndentLine() "{{{1 function! s:SetIndentLine()

View File

@@ -46,6 +46,10 @@ g:indentLine_color_gui *g:indentLine_color_gui*
Specify GUI vim indent line color. Specify GUI vim indent line color.
e.g. let g:indentLine_color_gui = '#A4E57E' e.g. let g:indentLine_color_gui = '#A4E57E'
g:indentLine_color_tty *g:indentLine_color_tty*
Specify none X terminal vim indent line color. (0 - 7)
e.g. let g:indentLine_color_tty = 2
g:indentLine_indentLevel *g:indentLine_indentLevel* g:indentLine_indentLevel *g:indentLine_indentLevel*
Specify how much indent level do you want to use for Specify how much indent level do you want to use for
indentLine. Most program will not has bigger indent level than indentLine. Most program will not has bigger indent level than