Update some user configs
This commit is contained in:
@ -16,16 +16,8 @@ endif
|
||||
|
||||
let g:colors_name = 'jinx'
|
||||
|
||||
if exists('g:jinx_theme_toggle_key') && g:jinx_theme_toggle_key !=# ''
|
||||
let s:t_key = g:jinx_theme_toggle_key
|
||||
else
|
||||
let s:t_key = ''
|
||||
if maparg('T', 'n') ==# ''
|
||||
let s:t_key = 'T'
|
||||
endif
|
||||
endif
|
||||
|
||||
" Colors {{{2
|
||||
" Colors {{{1
|
||||
|
||||
" empty color dictionary
|
||||
let s:jinx = {}
|
||||
@ -83,25 +75,8 @@ else
|
||||
let s:jinx.orange = ['#FF9157', 208]
|
||||
endif
|
||||
|
||||
" Functions {{{2
|
||||
|
||||
if !exists('g:jinx_theme_toggle_loaded') && s:t_key !=# ''
|
||||
let g:jinx_theme_toggle_loaded = 1
|
||||
function! Toggle_Theme() abort
|
||||
if exists('g:jinx_colors') && g:jinx_colors =~? 'day'
|
||||
let g:jinx_colors = 'night'
|
||||
else
|
||||
let g:jinx_colors = 'day'
|
||||
endif
|
||||
unlet g:colors_name
|
||||
colorscheme jinx
|
||||
let g:colors_name = 'jinx'
|
||||
endfunction
|
||||
execute 'nnoremap <silent> '.s:t_key.' :call Toggle_Theme()<CR>'
|
||||
endif
|
||||
|
||||
|
||||
function! <SID>HighLight(GRP, FG, BG, ATT) abort
|
||||
function! <SID>HighLight(GRP, FG, BG, ATT) abort " {{{1
|
||||
if a:FG !=# ''
|
||||
let l:fg_col = get(s:jinx, a:FG)
|
||||
let l:fg_true = l:fg_col[0]
|
||||
@ -128,14 +103,14 @@ call <SID>HighLight('Title', 'commnt', 'bgr', 'bold')
|
||||
call <SID>HighLight('Visual', '', 'select', '')
|
||||
call <SID>HighLight('SignColumn', '', 'line', '')
|
||||
call <SID>HighLight('CursorLine', '', 'line', 'none')
|
||||
call <SID>HighLight('CursorColumn', '', 'line', '')
|
||||
call <SID>HighLight('CursorColumn', '', 'line', '')
|
||||
call <SID>HighLight('CursorLineNr', 'cyan', 'line', '')
|
||||
call <SID>HighLight('LineNr', 'commnt', 'line', '')
|
||||
call <SID>HighLight('ColorColumn', 'fgr', 'red', '')
|
||||
call <SID>HighLight('ColorColumn', 'fgr', 'red', '')
|
||||
call <SID>HighLight('Error', 'red', 'bgr', '')
|
||||
call <SID>HighLight('ErrorMsg', 'red', 'bgr', '')
|
||||
call <SID>HighLight('WarningMsg', 'red', 'bgr', '')
|
||||
call <SID>HighLight('MatchParen', 'blue', 'line', 'underline')
|
||||
call <SID>HighLight('MatchParen', 'blue', 'bgr', 'bold')
|
||||
call <SID>HighLight('ModeMsg', 'cyan', 'bgr', '')
|
||||
call <SID>HighLight('MoreMsg', 'cyan', 'bgr', '')
|
||||
call <SID>HighLight('Directory', 'blue', 'bgr', '')
|
||||
@ -160,29 +135,27 @@ call <SID>HighLight('PmenuThumb', 'menu_fgr', 'menu_bgr', '')
|
||||
call <SID>HighLight('StatusLine', 'menu_bgr', 'menu_fgr', '')
|
||||
call <SID>HighLight('StatusLineNC', 'menu_fgr', 'menu_bgr', '')
|
||||
|
||||
" Spell {{{2
|
||||
|
||||
if has('spell')
|
||||
if has('spell') " {{{2
|
||||
call <SID>HighLight('SpellBad', '', '', 'undercurl')
|
||||
call <SID>HighLight('SpellLocal', '', '', 'undercurl')
|
||||
call <SID>HighLight('SpellRare', '', '', 'undercurl')
|
||||
endif
|
||||
|
||||
" CtrlP {{{2
|
||||
if exists('g:loaded_ctrlp') " {{{2
|
||||
call <SID>HighLight('CtrlPNoEntries', 'red', '', 'bold')
|
||||
call <SID>HighLight('CtrlPMatch', 'blue', '', 'bold')
|
||||
call <SID>HighLight('CtrlPLinePre', 'blue', 'menu_bgr', 'none')
|
||||
call <SID>HighLight('CtrlPPrtBase', 'blue', '', 'none')
|
||||
call <SID>HighLight('CtrlPPrtCursor', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPMode1', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPMode2', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPStats', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
endif
|
||||
|
||||
call <SID>HighLight('CtrlPNoEntries', 'red', '', 'bold')
|
||||
call <SID>HighLight('CtrlPMatch', 'blue', '', 'bold')
|
||||
call <SID>HighLight('CtrlPLinePre', 'blue', 'menu_bgr', 'none')
|
||||
call <SID>HighLight('CtrlPPrtBase', 'blue', '', 'none')
|
||||
call <SID>HighLight('CtrlPPrtCursor', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPMode1', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPMode2', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
call <SID>HighLight('CtrlPStats', 'menu_fgr', 'menu_bgr', 'bold')
|
||||
|
||||
" ALE {{{2
|
||||
|
||||
call <SID>HighLight('ALEErrorSign', 'red', 'line', 'bold')
|
||||
call <SID>HighLight('ALEWarningSign', 'orange', 'line', 'bold')
|
||||
if exists('g:loaded_ale') " {{{2
|
||||
call <SID>HighLight('ALEErrorSign', 'red', 'line', 'bold')
|
||||
call <SID>HighLight('ALEWarningSign', 'orange', 'line', 'bold')
|
||||
endif
|
||||
|
||||
" Generic {{{2
|
||||
|
||||
@ -460,7 +433,7 @@ call <SID>HighLight('DiffText', 'line', 'blue', 'bold')
|
||||
" Cleanup {{{2
|
||||
|
||||
" Remove the highlight function as it's no longer needed.
|
||||
" Will cause problems toggling the theme if not deleted.
|
||||
" Will cause problems reloading the theme if not deleted.
|
||||
delfunction <SID>HighLight
|
||||
|
||||
" vim:fdm=marker:et:sts=4:sw=4
|
||||
|
Reference in New Issue
Block a user