clean up legacy files
This commit is contained in:
parent
638ff2812f
commit
bc35923fe2
658 changed files with 196 additions and 1 deletions
34
legacy/init.auto-window.vim
Normal file
34
legacy/init.auto-window.vim
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"auto_window_settings {{{
|
||||
function! OnWinEnter() abort"{{{
|
||||
if &buftype != ''
|
||||
setlocal colorcolumn=0
|
||||
elseif exists('b:colorcolumn_restore')
|
||||
execute 'setlocal colorcolumn=' . b:colorcolumn_restore
|
||||
endif
|
||||
if &buftype == 'terminal'
|
||||
setlocal nonumber norelativenumber
|
||||
else
|
||||
setlocal number relativenumber
|
||||
endif
|
||||
setlocal cursorline
|
||||
setlocal cursorcolumn
|
||||
endfunction
|
||||
|
||||
"}}}
|
||||
function! OnWinLeave() abort"{{{
|
||||
let b:colorcolumn_restore = &colorcolumn
|
||||
setlocal colorcolumn=0
|
||||
setlocal nocursorline
|
||||
setlocal nocursorcolumn
|
||||
setlocal norelativenumber
|
||||
endfunction
|
||||
|
||||
"}}}
|
||||
augroup auto_window_settings "{{{
|
||||
autocmd!
|
||||
autocmd WinEnter * call OnWinEnter()
|
||||
autocmd WinLeave * call OnWinLeave()
|
||||
augroup END
|
||||
"}}} augroup auto_window_settings
|
||||
" }}} auto_window_settings
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue