←back to thread

214 points m4xshen | 4 comments | | HN request time: 0.982s | source
Show context
blahgeek ◴[] No.44022156[source]
I’ve been using vim for 10+ years. However I honestly don’t see the downside of repeating h or j to move up/down (with the key repeat delay adjusted to a small value). It’s more intuitive than using say 15j, which involves recognizing some number in the screen and then look at the keyboard to type because the upper number row cannot be easily touch typed
replies(10): >>44022175 #>>44022261 #>>44022263 #>>44022311 #>>44022792 #>>44022889 #>>44023557 #>>44025366 #>>44032682 #>>44041520 #
kiaofz ◴[] No.44022889[source]
I was the exact same until I started using relative line numbers. Then I can just look at a line and see that it's N lines down and jump there immediately. With j or k repeat I'll often over shoot and then have to go back which is kind of annoying.
replies(3): >>44024281 #>>44024318 #>>44025890 #
1. codr7 ◴[] No.44025890[source]
How is this easier than jumping straight to the line with absolute numbers?
replies(1): >>44025966 #
2. hellcow ◴[] No.44025966[source]
15j is easier than 4879gg. It’s a little bit quicker on big files—not a huge difference.
replies(1): >>44026602 #
3. lblume ◴[] No.44026602[source]
The information is also more relevant. How many lines a function or block has might make a difference, but the absolute file position is, more often than not, irrelevant.
replies(1): >>44032468 #
4. perrygeo ◴[] No.44032468{3}[source]
Funny, I was thinking exactly the opposite. Stack traces, logs, test failures, warning, etc will always reference an absolute number. If you want to tell a coworker where to find a section of code, you use the absolute number.

Relative numbers are useful to save a few keystrokes. But in every other context, absolute numbers are what's relevant.