If you're familiar with the iTerm2 application, you'll know that you can split views similar to vim, and the inactive views are "dimmed."
I usually work in vim with three vertical split views and it would be nice to dim the inactive ones by setting the background color to a darker tone, for example.
Is there a way to do this?
Throwing this out there as a new answer. https://github.com/TaDaa/vimade fades inactive buffers, preserves syntax highlighting, and can also fade signs. I am the author, but I figure this might be useful to some as a newer alternative. Supports nvim and vim8, 256 color terminals, termguicolors, and gui.
Changing the background colour as you describe would require different colourschemes for different Vim windows. As far as I know this is not possible, as it is a global setting (see this answer from a few days ago).
As a visual aid to which window is active, I find the statusline is usally sufficient. The highlight groups are different for the active window (
hi StatusLine
) and any innactive windows (hi StatusLineNC
). You could either choose a colourscheme with a very stark constrast between them, or edit your favourite colourscheme.I have come up with the following solution (using 'colorcolumn' and unsetting 'cursorline'):
View it at my (current) dotfiles: https://github.com/blueyed/dotfiles/blob/master/vimrc#L351
Update I have created a plugin out of it: https://github.com/blueyed/vim-diminactive
In neovim(v0.2.1), the following configuration will dim inactive panes: