Improve vim colors plugin

This commit is contained in:
Talia 2020-08-19 17:57:36 +02:00
parent a7c32a1167
commit 5233dea0e2

View file

@ -16,11 +16,16 @@ augroup kitty
augroup END augroup END
if $TERM=="xterm-kitty" if $TERM=="xterm-kitty"
augroup kitty augroup kitty
let s:kitty_bg=system("kitty @ get-colors | grep ^background") call system("which updatecolors")
let g:kitty_bg=s:kitty_bg[match(s:kitty_bg, "#"):] if v:shell_error
au VimLeavePre * echom system("kitty @ set-colors background=".g:kitty_bg) let s:kitty_bg=system("kitty @ get-colors | grep ^background")
augroup END let g:kitty_bg=s:kitty_bg[match(s:kitty_bg, "#"):]
au VimLeavePre * echom system("kitty @ set-colors background=".g:kitty_bg)
else
au VimLeavePre * call system("updatecolors")
end
augroup END
end end
com! Dark silent! let g:colors_name_bak = g:colors_name com! Dark silent! let g:colors_name_bak = g:colors_name