vim-numbertoggle

by jeffkreeftmeijer

jeffkreeftmeijer /vim-numbertoggle

Toggles between hybrid and absolute line numbers automatically

461 Stars 45 Forks Last release: almost 3 years ago (2.1.1) MIT License 49 Commits 3 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

numbertoggle

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.

Installation

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
.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.