Dotfiles/site-modules/core/files/vim/plugin/active-highlight.vim
Ade Attwood 80239af169 refactor(core): start to make dotfiles public
This is the first commit that brings the privet dotfiles to a public
reop previously this was all one puppet module. Now this has been split
out so I can put all of the private files in a private puppet module
2020-09-20 06:22:17 +01:00

13 lines
523 B
VimL

"
" Highlights the active window in neo Vim. `ActiveWindow` is only available
" in neovim so
"
if has('nvim')
hi ActiveWindow ctermbg=00 | hi InactiveWindow ctermbg=22
set winhighlight=Normal:ActiveWindow,NormalNC:InactiveWindow
au VimEnter,WinEnter,BufEnter,BufWinEnter,FocusGained,CompleteDone * hi ActiveWindow ctermbg=00 | hi InactiveWindow ctermbg=22
au VimLeave,WinLeave,BufLeave,BufWinLeave,FocusLost * hi ActiveWindow ctermbg=22 | hi InactiveWindow ctermbg=22
else
hi Normal ctermbg=None
endif