I've been exploring vim some more in order to be able to use it better and while doing so, I've re-activated the showing of the line numbers with the relative line numbers active.
So my .vimrc contains following lines:
" Set line-numbers
set nu
set relativenumber
This all works nicely, though vim starts counting the current line from 0, while I like it to count from 1.
So currently it looks like this:
2 " Something else
1
3 " Set line-numbers
1 set nu
2 set relativenumber
Note: The 3 is the current line number.
Let's assume that I like to cut my line number config, I have to use the command 3dd while the relative line number states 2. Does anyone know how to change this to:
3 " Something else
2
3 " Set line-numbers
2 set nu
3 set relativenumber
JVApen
The counting is built into Vim's core; you'd have to change the source code and recompile your custom binary. Alternatively, there's the RltvNmbr.vim plugin, which emulates the setting in Vimscript. By modifying that, you'd avoid the recompilation, but only get an emulation that's far from perfect. Better adapt to Vim's way of counting :-)
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