Toggle relative line numbers with ease.
Please use your favorite plugin manager.
Using vim-plug:
Plug 'kennykaye/vim-relativity'
Command | Description |
---|---|
:Relativity |
Toggle Relativity on/off |
:Relativity! |
Turn Relativity off |
Option | Default | Description |
---|---|---|
g:relativity_insert_toggle |
1 | Enables toggling on InsertEnter and InsertLeave . |
g:relativity_focus_toggle |
1 | Enables toggling on FocusEnter and FocusLeave . |
g:relativity_current_absolute |
1 | Displays absolute line number for current line. |
g:relativity_enabled_on_start |
1 | Enable Relativity automatically when vim starts. |
g:relativity_buftype_ignore |
['nofile'] |
A list of buffer types to disable toggling for. |
g:relativity_filetype_ignore |
['controlp', 'nerdtree', 'fugitive', 'tagbar', 'agsv', 'fzf'] |
A list of filetypes to disable toggling for. |
Inspired by numbers.vim and vim-numbertoggle
MIT