From 845227edde1d89fec65a26ec8ef4fb009d1560de Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Sat, 3 Mar 2018 16:28:16 +0800 Subject: [PATCH] Fix indentline (#1447) --- autoload/SpaceVim/layers/checkers.vim | 3 --- autoload/SpaceVim/layers/ui.vim | 13 +++++++++---- autoload/zvim/util.vim | 21 --------------------- config/plugins_before/vimfiler.vim | 7 ++++++- init.vim | 1 - 5 files changed, 15 insertions(+), 30 deletions(-) diff --git a/autoload/SpaceVim/layers/checkers.vim b/autoload/SpaceVim/layers/checkers.vim index bc844b986..77914d34d 100644 --- a/autoload/SpaceVim/layers/checkers.vim +++ b/autoload/SpaceVim/layers/checkers.vim @@ -109,7 +109,6 @@ function! s:neomake_cursor_move_delay() abort endfunction let s:last_echoed_error = '' -let s:clv = &conceallevel function! s:neomake_signatures_current_error(...) abort call s:neomake_signatures_clear() try @@ -128,7 +127,6 @@ function! s:neomake_signatures_current_error(...) abort return endif let s:last_echoed_error = message - set conceallevel=2 if len(line('.') + 1) > len(message) let message = s:STRING.fill(message, len(line('.') + 1)) endif @@ -140,7 +138,6 @@ function! s:neomake_signatures_clear() abort call timer_stop(s:neomake_cursormoved_timer) endif let s:last_echoed_error = '' - let &conceallevel = s:clv call s:SIG.clear() endfunction diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index d2fb57cb7..c0e808df6 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -9,7 +9,7 @@ scriptencoding utf-8 function! SpaceVim#layers#ui#plugins() abort let plugins = [ - \ ['Yggdroot/indentLine'], + \ ['Yggdroot/indentLine', {'merged' : 0}], \ ['majutsushi/tagbar', {'loadconf' : 1}], \ ['tenfyzhong/tagbar-makefile.vim', {'merged': 0}], \ ['tenfyzhong/tagbar-proto.vim', {'merged': 0}], @@ -29,11 +29,16 @@ function! SpaceVim#layers#ui#plugins() abort endfunction function! SpaceVim#layers#ui#config() abort - let g:indentLine_color_term = get(g:, 'indentLine_color_term', 239) - let g:indentLine_color_gui = get(g:, 'indentLine_color_gui', '#09AA08') - let g:indentLine_char = get(g:, 'indentLine_char', '¦') + if g:spacevim_colorscheme_bg == 'dark' + let g:indentLine_color_term = get(g:, 'indentLine_color_term', 239) + let g:indentLine_color_gui = get(g:, 'indentLine_color_gui', '#504945') + else + let g:indentLine_color_gui = get(g:, 'indentLine_color_gui', '#d5c4a1') + endif + let g:indentLine_char = get(g:, 'indentLine_char', '┊') let g:indentLine_concealcursor = 'niv' let g:indentLine_conceallevel = 2 + let g:indentLine_fileType = ['*'] let g:indentLine_fileTypeExclude = ['help', 'man', 'startify', 'vimfiler'] let g:signify_disable_by_default = 0 let g:signify_line_highlight = 0 diff --git a/autoload/zvim/util.vim b/autoload/zvim/util.vim index 5c738d5d0..cfc791b17 100644 --- a/autoload/zvim/util.vim +++ b/autoload/zvim/util.vim @@ -186,27 +186,6 @@ function! zvim#util#listDirs(dir) abort return [] endfunction -function! zvim#util#OpenVimfiler() abort - if bufnr('vimfiler') == -1 - silent VimFiler - if exists(':AirlineRefresh') - AirlineRefresh - endif - wincmd p - if &filetype !=# 'startify' - IndentLinesToggle - IndentLinesToggle - endif - wincmd p - else - silent VimFiler - doautocmd WinEnter - if exists(':AirlineRefresh') - AirlineRefresh - endif - endif -endfunction - let s:plugins_argv = ['-update', '-openurl'] function! zvim#util#complete_plugs(ArgLead, CmdLine, CursorPos) abort diff --git a/config/plugins_before/vimfiler.vim b/config/plugins_before/vimfiler.vim index ea8e9e15c..3684f4243 100644 --- a/config/plugins_before/vimfiler.vim +++ b/config/plugins_before/vimfiler.vim @@ -1 +1,6 @@ -noremap :call zvim#util#OpenVimfiler() +function! s:open_vimfiler() abort + silent VimFiler + doautocmd WinEnter +endfunction + +nnoremap :call open_vimfiler() diff --git a/init.vim b/init.vim index 66a1a99d5..3bbe99aa6 100644 --- a/init.vim +++ b/init.vim @@ -5,5 +5,4 @@ " URL: https://spacevim.org " License: GPLv3 "============================================================================= - execute 'source' fnamemodify(expand(''), ':h').'/config/main.vim'