From bfcc80d8c6629c612e6d40f5cc0576a47795351a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Nov 2021 19:31:50 +0900 Subject: neovim/vim: move highlight settings to my colorscheme file --- .vimrc | 61 ++++++++----------------------------------------------------- 1 file changed, 8 insertions(+), 53 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 884dd7e..521e79c 100644 --- a/.vimrc +++ b/.vimrc @@ -1178,59 +1178,14 @@ endfunction " Color scheme {{{2 -" A command which changes color scheme with fall back. -command! -bang -nargs=? - \ ColorScheme - \ call s:colorscheme(0, ) - - -function! s:colorscheme(bang, name) abort - try - if get(g:, 'colors_name') isnot# a:name || a:bang - execute 'colorscheme' a:name - endif - catch - " Loading colorscheme failed. - " The color scheme, "desert", is one of the built-in ones. Probably, it - " will be loaded without any errors. - colorscheme desert - endtry -endfunction - - -function! s:extra_highlight() abort - if &background != 'dark' - return - endif - - hi! link YankRoundRegion DiffChange - - hi! link OperatorSandwichBuns DiffChange - hi! link OperatorSandwichStuff DiffChange - hi! link OperatorSandwichDelete DiffChange - hi! link OperatorSandwichAdd OperatorSandwichBuns - - hi EasyMotionShade guifg=#4d4d4d guibg=NONE gui=NONE cterm=NONE - hi EasyMotionTarget guifg=#ff7100 guibg=NONE gui=underline cterm=underline - hi! link EasyMotionMoveHL IncSearch - - hi statusLineModeNormal guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeInsert guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeVisual guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeOperator guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeReplace guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeCommand guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeTerminal guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineModeOther guifg=NONE guibg=NONE gui=bold cterm=bold - hi statusLineLeft guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE - hi statusLineRight guifg=#b7b7b7 guibg=#606060 gui=NONE cterm=NONE -endfunction - - -Autocmd ColorScheme ocean call s:extra_highlight() - - -ColorScheme! ocean +try + colorscheme ocean +catch + " Loading colorscheme failed. + " The color scheme, "desert", is one of the built-in ones. Probably, it + " will be loaded without any errors. + colorscheme desert +endtry -- cgit v1.2.3-70-g09d2