Hacker News new | ask | show | jobs
by rbonvall 4529 days ago
At least in Vim, line numbers help to move around and operate on text really quickly.

Move cursor to ninth line above: 9k

Delete from here to seventh line below: 7dd

Copy thirteenth line above after second line below: :-13t+2

Having line numbers always visible (either relative or absolute) helps for doing this operations quickly.

1 comments

Emacs offers goto-line on M-g g or M-g M-g, which admittedly is not the handiest of key sequences; I've been thinking about rebinding that to be more useful, but I don't use it often enough to really need to.

Line numbers are also useful, for example, when doing web development, and hunting down the line that's mentioned in a stack trace. Absent integration between the browser's debugger and Emacs, which is something I've fiddled around with (based on mozrepl) but never got working, that's a good second best.