Skip to content
Browse files

corrected a typo and only mapping Ctrl-n when relativenumber is avail…

…able
  • Loading branch information...
1 parent 9b2b866 commit 75e6c9809a478596d92b5a1ca35b150906afb9fd @matijs committed Feb 8, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 .vimrc
View
5 .vimrc
@@ -32,9 +32,10 @@ set listchars=tab:▸\ ,eol:¬
let g:solarized_termcolors=256
" use line numbers
set number
-" and use relative line numbers by default if possible
+" use relative line numbers by default if possible and map Ctrl-n to toggle between relative and absolute line numbers
if exists("&relativenumber")
set relativenumber
+ nnoremap <C-n> :call NumberToggle()<cr>
endif
" toggle between relative and absolute line numbers
function! NumberToggle()
@@ -44,7 +45,5 @@ function! NumberToggle()
set relativenumber
endif
endfunc
-" map Ctrl-C to toggle between relative and absolute line numbers
-nnoremap <C-n> :call NumberToggle()<cr>
" start scrolling 4 lines before hitting the bottom of the screen
set scrolloff=4

0 comments on commit 75e6c98

Please sign in to comment.
Something went wrong with that request. Please try again.