As title. Say I have 2 (vertical) window splits, I just want to change the background color of the right one. Is this even possible? If so, How?
1 Answer
This is :h 'wincolor'
in Vim. And :h 'winhighlight'
in Neovim.
:execute printf("hi RandomBg guibg=#%x", rand() % 0xFFFFFF)
:let w = winnr("l")
:if has("nvim")
: call setwinvar(w, "&winhighlight", "Normal:RandomBg")
:else
: call setwinvar(w, "&wincolor", "RandomBg")
:endif
-
Sorry for my late upvote! Great, a very happy news after work :) Feb 11, 2022 at 16:08