DEV Community

Discussion on: You're using Vim Wrong - Relative Line Numbers

Collapse
 
waylonwalker profile image
Waylon Walker

♥ relative line numbers. A big part of it is the language of yank 4 lines, or delete up 10 lines to move code around.

I don't worry too much about the keystrokes as I do about the mental overhead. I like things like this that are very natural and let me focus my energy on my task.

Collapse
 
ug02fast profile image
Arthur Zhuk

Managing mental overhead is the crux when it comes to coding for me as well. That's one reason I don't like using sneak as much. I like to be in the habit of making those constant vim motion commands instead of typing out the word I want to jump to. Should be an interesting case study to say the least.

Collapse
 
waylonwalker profile image
Waylon Walker

Honestly a lot of time I even do a dj.. rather than d6j as it is easier to see. I can have 2 lines gone faster than my eyes move to the numbers and find it on the number row. The main reason I us relative lines are when I need the whole block in my paste register.

Collapse
 
megasuperlexa profile image
megasuperlexa • Edited

Yank works with the absolute line numbers as well.
type V as usual to visually select lines
type 123G to go to desired line
now yank. Or delete.
thats all
Benefit is that you are seeing what you are doing