0

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!

Nisba
  • 895
  • 8
  • 19
  • See Emacs bug #[5042](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5042) and [emacs-devel discussion](http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00363.html). – Drew Oct 30 '16 at 17:20
  • Also, this seems to be a duplicate of http://emacs.stackexchange.com/q/24634/105. – Drew Oct 30 '16 at 17:23
  • @Drew no, it is not a duplicate – Nisba Oct 30 '16 at 19:21

1 Answers1

1

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.

icarus
  • 1,904
  • 1
  • 10
  • 15