diff options
-rw-r--r-- | .vimrc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc index eb214fe1..5d5e517c 100644 --- a/.vimrc +++ b/.vimrc @@ -92,6 +92,7 @@ nnoremap ` ' " Clear search highlights nmap <silent> <leader>n :silent :nohlsearch<CR> + " Toggle visible whitespace nmap <silent> <leader>s :set list!<CR> @@ -116,6 +117,17 @@ nmap <silent> <leader>gp :Git push<CR> nnoremap <leader>u :GundoToggle<CR> +" Toggle relative/absolute numbers +function! NumberToggle() + if(&relativenumber == 1) + set number + else + set relativenumber + endif +endfunc + +nnoremap <silent> <C-n> :call NumberToggle()<cr> + " Custom commands command! W :w |