Is there any way to display both relative and absolute line numbers simultaneously in Vim? Either side-by-side, or some other interesting presentation are fine.
Relative Numbering is not turned on by default in vim, which means that you are probably turning it on through your ~/. vimrc file or one of your plugins. Look for set relativenumber or set rnu . To turn it off for the current vim session you would simply run set norelativenumber or set nornu for short.
When you display relative numbers in Vim, each line is numbered by its distance from the cursor. Take a look at the position of the cursor in the image above. This position is marked as 0. Accordingly, lines above and under the cursor are labeled as 1, the next ones 2 and so on.
Yes, you can. Use RltvNmbr.vim to display the relative numbers, and use Vim to display the absolute ones:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With