Last active
February 13, 2022 18:43
-
-
Save McFrappe/10cf7b5f89f1ce55bbf834e963967ba5 to your computer and use it in GitHub Desktop.
Logic for entering/leaving a pane. Provides a column for active pane.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Logic for entering/leaving a pane | |
function! OnWinEnter() | |
if exists('w:initial_cc') | |
let &colorcolumn = w:initial_cc | |
endif | |
endfunction | |
function! OnWinLeave() | |
if !exists('w:initial_cc') | |
let w:initial_cc=&colorcolumn | |
endif | |
let &colorcolumn = 0 | |
endfunction | |
augroup BgHighlight | |
autocmd! | |
autocmd WinEnter * call OnWinEnter() | |
autocmd WinLeave * call OnWinLeave() | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment