From dc8de9e188d9ac0c8075b580339c2632044629cd Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Mon, 9 Jul 2018 15:24:00 +0200 Subject: [PATCH] Hybrid number only in normal mode --- .vim/vimrc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.vim/vimrc b/.vim/vimrc index 263d73c..59977b1 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -65,7 +65,6 @@ set display+=lastline set lazyredraw set number set relativenumber -"set cursorline " fold set foldmethod=syntax @@ -154,6 +153,7 @@ cnoreabbrev w!! w !sudo tee "%" " Commands " Plugins + " ALE packadd ale @@ -203,14 +203,20 @@ nnoremap b :CtrlPBuffer nnoremap m :CtrlPMRU - " autocommands autocmd BufReadPost quickfix nnoremap autocmd bufnewfile,bufread *.md set filetype=markdown autocmd bufnewfile,bufread *.gradle set filetype=groovy -augroup save - au! - au FocusLost * wall + +augroup saveall + autocmd! + autocmd FocusLost * wall +augroup END + +augroup numbertoggle + autocmd! + autocmd BufEnter,FocusGained,InsertLeave * set relativenumber + autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber augroup END " local -- 2.43.0