Improve vim colors plugin
This commit is contained in:
parent
a7c32a1167
commit
5233dea0e2
1 changed files with 10 additions and 5 deletions
|
@ -17,9 +17,14 @@ augroup END
|
||||||
|
|
||||||
if $TERM=="xterm-kitty"
|
if $TERM=="xterm-kitty"
|
||||||
augroup kitty
|
augroup kitty
|
||||||
|
call system("which updatecolors")
|
||||||
|
if v:shell_error
|
||||||
let s:kitty_bg=system("kitty @ get-colors | grep ^background")
|
let s:kitty_bg=system("kitty @ get-colors | grep ^background")
|
||||||
let g:kitty_bg=s:kitty_bg[match(s:kitty_bg, "#"):]
|
let g:kitty_bg=s:kitty_bg[match(s:kitty_bg, "#"):]
|
||||||
au VimLeavePre * echom system("kitty @ set-colors background=".g:kitty_bg)
|
au VimLeavePre * echom system("kitty @ set-colors background=".g:kitty_bg)
|
||||||
|
else
|
||||||
|
au VimLeavePre * call system("updatecolors")
|
||||||
|
end
|
||||||
augroup END
|
augroup END
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue