From: Jannik ZANDER Date: Mon, 9 Jul 2018 13:24:00 +0000 (+0200) Subject: Hybrid number only in normal mode X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=dc8de9e188d9ac0c8075b580339c2632044629cd;p=dotfiles.git Hybrid number only in normal mode --- 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