Skip to content

Instantly share code, notes, and snippets.

@neilmiddleton
Created June 28, 2012 16:41
Show Gist options
  • Save neilmiddleton/3012412 to your computer and use it in GitHub Desktop.
Save neilmiddleton/3012412 to your computer and use it in GitHub Desktop.
Use Ctrl+L to flip between absolute and relative line numbering in VIM
" use Ctrl+L to toggle the line number counting method
function! g:ToggleNuMode()
if(&rnu == 1)
set nu
else
set rnu
endif
endfunc
nnoremap <C-L> :call g:ToggleNuMode()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment