[FIX][VIM] Make configuration compatible w/ nvim

This commit is contained in:
Bruno BELANYI 2020-10-14 16:43:18 +02:00
parent 14679d3e81
commit 2bf7f53ade
2 changed files with 10 additions and 2 deletions

View file

@ -9,5 +9,9 @@ augroup numbertoggle
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
" Disable line numbers and relative line numbers in terminal " Disable line numbers and relative line numbers in terminal
if exists('##TerminalOpen')
autocmd TerminalOpen * setlocal nonu nornu autocmd TerminalOpen * setlocal nonu nornu
elseif has('nvim')
autocmd TermOpen * setlocal nonu nornu
endif
augroup END augroup END

View file

@ -4,5 +4,9 @@ augroup signtoggle
autocmd BufEnter,FocusGained,WinEnter * set signcolumn=yes autocmd BufEnter,FocusGained,WinEnter * set signcolumn=yes
autocmd BufLeave,FocusLost,WinLeave * set signcolumn=no autocmd BufLeave,FocusLost,WinLeave * set signcolumn=no
" Disable the sign column in terminal " Disable the sign column in terminal
autocmd TerminalOpen * set signcolumn=no if exists('##TerminalOpen')
autocmd TerminalOpen * setlocal signcolumn=no
elseif has('nvim')
autocmd TermOpen * setlocal signcolumn=no
endif
augroup END augroup END