Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
" C-n to toggle relative/normal line numbers
function! NumberToggle()
if(&relativenumber == 1)
set number
else
set relativenumber
endif
endfunc
nnoremap <C-n> :call NumberToggle()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment