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
|
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
|
||||||
|
|
Loading…
Reference in a new issue