Toggles between hybrid and absolute line numbers automatically
Vim script
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
doc Release 2.1.0 Sep 20, 2017
plugin Toggle on WinEnter and WinLeave Oct 26, 2017
LICENSE Add Sep 2, 2017
README.markdown Add GIF to README Sep 20, 2017



In a buffer with "hybrid" line numbers (:set number relativenumber), numbertoggle switches to absolute line numbers (:set number norelativenumber) automatically when relative numbers don't make sense.

vim-numbertoggle toggles between "hybrid" and absolute line numbers automatically

Relative numbers are used in a buffer that has focus, and is in normal mode, since that's where you move around. They're turned off when you switch out of Vim, switch to another split, or when you go into insert mode.


Using vim-plug

  1. Add Plug 'jeffkreeftmeijer/vim-numbertoggle' to ~/.vimrc or ~/.config/nvim/init.vim
  2. Run :PlugInstall
  3. :set number relativenumber

Once help tags are generated, you can view the manual with :help numbertoggle.