auto switch between linenumbering
This commit is contained in:
parent
9437ae2bc6
commit
1e68b31e92
1 changed files with 8 additions and 0 deletions
8
.vimrc
8
.vimrc
|
@ -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>
|
||||||
|
|
Loading…
Add table
Reference in a new issue