Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

#G (i.e. 20G) would put the cursor on line 20, but that's only useful if you have line numbers in your editor. If you have relative line numbers then #j movement is easy since the number you need to jump up or down should already be calculated.


I did turn on relative line numbers and still feels laborious compared to mouse click which happens within 500 ms.

Say I want to go up by 13 lines and on the 4th word:

Step 1: Scan visually on the left gutter for a line number (relative or not)

Step 2: 13j

Step 3: 3e (3 words to the right)

Everything else in vim is fast except navigation for me. With mouse, it is a little bit of a pain to move the hand over to the mouse and the click, but still feels orders of magintude faster than jumbling around with line numbers.


I mostly use / and ? for jumping about in the code. It’s always just a few keystrokes and you’re where you want to be.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: