vim_config/config/before/theme.vim
2022-09-27 18:05:19 +02:00

38 lines
855 B
VimL

""" Themes and colors
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" source $VIMHOME/config/themes/melange.vim
source $VIMHOME/config/themes/miramare.vim
function! s:colorscheme_gitgo()
hi Search guibg=Green
endfunction
function! s:colorscheme_miramare()
hi Search guibg=Purple
endfunction
autocmd! ColorScheme gitgo call s:colorscheme_gitgo()
autocmd! ColorScheme miramare call s:colorscheme_miramare()
function! LightOrDarkness()
if &background==?"dark"
set background=light
colorscheme gitgo
elseif &background==?"light"
set background=dark
execute 'colorscheme ' . g:colorscheme
endif
endfunction
" Needed for kitty not to f*ck up the background color
let &t_ut=''
" virtualedit
"set virtualedit=all