I use the "go to line" navigation a lot, but mostly of the time I have to type a three digit number in order to navigate through the document.

I would like to have a row count referring to the visible area of the window and not to all the document, in such a way I will always have to type only a 1 or 2 digit number when navigating.

For instance typing M-g M-g 3 RET I would like to go to the third visible line and not the third line of the document.

Thank you!


One option you can explore is to install https://github.com/abo-abo/avy. If you bind M-g M-g to avy-goto-line then it will give you an overlay so that a single letter from the home row of the keyboard will take you to the first 7 rows of the screen, and a pair of letters from the home row will take you to most of the rest of the screen.

If you enter a number it will forward that to the standard goto-line, so you get fast navigation to onscreen lines using one or two letters, and can go to any line with numbers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.