Improve vim colors plugin
This commit is contained in:
parent
a7c32a1167
commit
5233dea0e2
1 changed files with 10 additions and 5 deletions
|
@ -16,11 +16,16 @@ augroup kitty
|
|||
augroup END
|
||||
|
||||
if $TERM=="xterm-kitty"
|
||||
augroup kitty
|
||||
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)
|
||||
augroup END
|
||||
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
|
||||
|
||||
com! Dark silent! let g:colors_name_bak = g:colors_name
|
||||
|
|
Loading…
Reference in a new issue