GitHub - jeffkreeftmeijer/vim-numbertoggle: Toggles between hybrid and absolute...
source link: https://github.com/jeffkreeftmeijer/vim-numbertoggle
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.markdown
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.
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
- Add
Plug 'jeffkreeftmeijer/vim-numbertoggle'
to~/.vimrc
or~/.config/nvim/init.vim
- Run
:PlugInstall
:set number relativenumber
Once help tags are generated, you can view the manual with :help numbertoggle
.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK