sponsor Vim development Vim logo Vim Book Ad

ToggleLineNumberMode : Switch between

 script karma  Rating 228/62, Downloaded by 822  Comments, bugs, improvements  Vim wiki

created by
script type
switch between "Relative" and "Absolute" line number is easy with command
''':set nornu'''
''':set rnu'''

it could be more easier by a vim script:

function! g:ToggleNuMode()
if(&rnu == 1)
set nornu
set rnu

and a Ctrl+L key map
nnoremap <C-L> :call g:ToggleNuMode()<cr>

this is exactly what the script does, you can just put the code into your vimrc if you don't want install a plugin :)
install details
put it into your vimfiles/plugin

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
toggleRelative.vim 1.1 2013-09-19 7.3 aj3423 vim7.4 uses "set nornu"
toggleRelative.vim 1.0 2010-09-09 7.0 aj3423 Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo