diff options
author | June McEnroe <programble@gmail.com> | 2012-02-02 22:47:30 -0500 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2012-02-02 22:47:30 -0500 |
commit | 9ad9537052ad29893161f2e7148976f043cd6fd4 (patch) | |
tree | 842fa6669c0823fd79cac72334f5b7f21420fb4a | |
parent | Add itchy.vim (diff) | |
download | src-9ad9537052ad29893161f2e7148976f043cd6fd4.tar.gz src-9ad9537052ad29893161f2e7148976f043cd6fd4.zip |
Add mapping to toggle relative/absolute numbering
Diffstat (limited to '')
-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 |