vim: use more robust highlighting stuff

master
an 2019-08-12 18:54:59 -04:00
parent 31e639104d
commit f5f03d9e6a
1 changed files with 15 additions and 9 deletions

View File

@ -103,8 +103,6 @@ fu _agw.file_type()
endfu
fu _agw.statusline_start()
hi clear StatusLine
hi StatusLine guibg=#0a0a0a guifg=#92ebf0
return ''
endfu
@ -134,6 +132,17 @@ fu _agw.setup_asm()
setlocal filetype=asm_ca65
endfu
fu _agw.set_color(scheme)
execute 'colorscheme' g:_agw.colors[a:scheme]
hi clear StatusLine
hi clear SpecialKey
hi clear NonText
hi StatusLine guibg=#0a0a0a guifg=#92ebf0
hi SpecialKey guifg=#7e4594
hi NonText guifg=#7e4594
hi Normal ctermbg=bg guibg=NONE
endfu
" Settings -------------------------------------------------------------------|
" general settings (use :help for these)
@ -356,10 +365,6 @@ else
set directory=$HOME/.vim/temp//
endif
let ruby_heredoc_syntax_filetypes = {
\ "ninja": {"start": "__ninja__"},
\}
if _agw.use_rainbow != 0
let rainbow_conf = {
\ 'guifgs': ['#ff533d', '#ff973d', '#ffe13d', '#91ff3d', '#3dffd8', '#3daeff', '#6a3dff', '#ee3dff'],
@ -407,10 +412,12 @@ end
syntax on
set background=dark
if _agw.cr_scheme == -2
colorscheme evening
elseif _agw.cr_scheme != -1
execute 'colorscheme' _agw.colors[_agw.cr_scheme]
call _agw.set_color(_agw.cr_scheme)
endif
filetype on
@ -449,8 +456,7 @@ au BufEnter * call _agw.close_empty()
" set color randomly on buffer enter
if _agw.cr_scheme == -1
au BufEnter * execute 'colorscheme'
\ _agw.colors[localtime() % len(_agw.colors)]
au BufEnter * call _agw.set_color(localtime() % len(_agw.colors))
endif
" .rkt → Racket