News for hackers. Stuff that matters.
Re:The Efficiency of Vim by nrds on Wednesday February 26, 2025 @10:23PM (#43190982)
Counting anything in vim is an antipattern.

    :set rnu
    :set nu
will change the gutter to display relative line numbers for all but the current line.

FWIW I would very rarely if ever use '5dd'; to me that is spelled 'd4j'. ':set rnu' obviously influences this, since the last line to be copied is labeled '4'.

Undo is 'u' and, yeah, you probably need to know that one before starting. Even after over 15 years using vim I still make tons of mistakes and change my mind, and a fairly robust undo system is crucial.

Re:The Efficiency of Vim by AlienRobot on Wednesday February 26, 2025 @10:30PM (#43191029)
I have tried setting relative numbering, but because I need to look at the gutter to read it, it would be faster to just hold shift+down in VS code if I need to do something with 5 lines of code, and if it's a lot of lines, just use the mouse, or press page down, or ctrl+shift+end if it's all the way to the end.
Re:The Efficiency of Vim by kevin_thibedeau on Wednesday February 26, 2025 @10:43PM (#43191105)
v/V mode is right there for block selection.