[vim/vim] Relative numbers should start counting from 2 instead. (Issue #20808)

5 views
Skip to first unread message

Caleb Josue Ruiz Torres

unread,
Jul 21, 2026, 7:27:43 PM (10 hours ago) Jul 21
to vim/vim, Subscribed
cruiztorresj created an issue (vim/vim#20808)

:set relativenumber and :set rnu gives you the means to visualize the line numbers of the surrounding lines in relation to your current line.

I think the numbering of these relative lines should start at 2, in this way you see right away the number that should be accompanying any given command.

See the following example:

Current numbering

1    ABC
  1  DEF
  2  GHI
  3  JKL

What I am suggesting

1    ABC
  2  DEF
  3  GHI
  4  JKL

If your current line (left-most digit) is 1, and you want to delete three lines using dd, in the way I am suggesting you see right away you have to use 3dd. While currently you have to add 1 to the number line being shown. Given how close these lines are this may seem trivial, trying to delete 11 lines becomes not so obvious.

I was hesitant on making this suggestion because this Software has been in production for a long time, and lots of users seem to be very productive the way it is now. More likely this will be some sort of vim on training wheels.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20808@github.com>

Maxim Kim

unread,
Jul 21, 2026, 7:36:59 PM (10 hours ago) Jul 21
to vim/vim, Subscribed
habamax left a comment (vim/vim#20808)

if you want to delete 3 lines just use 3 in 3dd. Relative numbers are, for example, when you don't know how many lines to delete but would like to delete lines up until and including a line somewhere up or down.

e.g. d2j to delete from current line down 2 lines

1    ABC
  1  DEF
  2  GHI
  3  JKL

->

1    JKL


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20808/5040154024@github.com>

zeertzjq

unread,
Jul 21, 2026, 7:39:35 PM (10 hours ago) Jul 21
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#20808)

:h 'relativenumber' says right there how you should use the relative number as a count:

        Show the line number relative to the line with the cursor in front of
        each line.  Relative line numbers help you use the count you can
        precede some vertical motion commands (e.g. j k + -) with, without
        having to calculate it yourself.  Especially useful in combination
        with other commands (e.g. y d c < > gq gw =).


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20808/5040169997@github.com>

Reply all
Reply to author
Forward
0 new messages