-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vim: terminal window does not dim off #45
Comments
It looks like I am using Neovim myself mostly, which offers proper highlighting (not requiring the hack of using ColorColumn), and I am using the following myself: if 1 && exists('+winhighlight')
function! s:configure_winhighlight()
let ft = &filetype
let bt = &buftype
" Check white/blacklist.
if &diff || (index(['dirvish'], ft) == -1
\ && (index(['nofile', 'nowrite', 'acwrite', 'quickfix', 'help'], bt) != -1
\ || index(['startify'], ft) != -1))
set winhighlight=NormalNC:MyNormalWin
else
set winhighlight=NormalNC:MyInactiveWin
endif
endfunction
augroup inactive_win
au!
au ColorScheme * hi link MyInactiveWin ColorColumn
au FileType,BufWinEnter * call s:configure_winhighlight()
if exists('##OptionSet')
" TODO: does not work with :Gdiff - diffsplit does not trigger it, too!
au OptionSet diff call s:configure_winhighlight()
endif
augroup END
else
Plug 'blueyed/vim-diminactive'
let g:diminactive_enable_focus = 1
" let g:diminactive_debug = 1
endif |
@blueyed, given how well your snippet above works, would it make sense to incorporate that into the plugin itself for special handling in neovim? I found this issue seeking the same solution and am using neovim. For now, I've got your snippet in place of my Plug line for the plugin. |
+1 and thanks for your work. Only just discovered this after several months of "crippled" Vim highlighting even though I am a Neovim user myself. This should be the default behavior when Neovim is detected, or if there's other considerations, at least documented properly. Right now the README reads:
which shouldn't be an issue for Neovim users. |
In Vim 8.1, a build-in term is support with the command :term. However, term windows does not dim off. Please look into it if you are available. Thanks for your efforts.
The text was updated successfully, but these errors were encountered: