auto switch between linenumbering

This commit is contained in:
Jidbo 2019-01-27 00:23:56 +01:00
parent 9437ae2bc6
commit 1e68b31e92

8
.vimrc
View file

@ -123,6 +123,14 @@ set foldlevel=99
" remap code folding " remap code folding
nnoremap <leader>g za nnoremap <leader>g za
" toggle hybrid number mode
nnoremap <leader>h :set rnu!<CR>
:augroup numbertoggle
: autocmd!
: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
: autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
:augroup END
" disable arrow keys " disable arrow keys
noremap <Up> <Nop> noremap <Up> <Nop>
noremap <Down> <Nop> noremap <Down> <Nop>