Improve vim colors plugin

This commit is contained in:
Talia 2020-08-19 17:57:36 +02:00
parent a7c32a1167
commit 5233dea0e2
1 changed files with 10 additions and 5 deletions

View File

@ -17,9 +17,14 @@ augroup END
if $TERM=="xterm-kitty"
augroup kitty
call system("which updatecolors")
if v:shell_error
let s:kitty_bg=system("kitty @ get-colors | grep ^background")
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