TIL: Something New About Ace Jump Mode

Regular readers know that I've been a huge fan of ace-jump-mode ever since I saw it demonstrated by Magnor Sveen in one of his celebrated Emacs Rocks! episodes. More recently, I've been using it all the time as a replacement for isearch to navigate within a buffer.

Since I started using ace-jump-mode instead of the Yegge approved isearch, my efficiency at jumping around a buffer has been increased significantly. Still, it doesn't directly address a problem that I often have. When scrolling through a buffer with【Ctrl+v】 or【Meta+v】, I often find myself at the wrong edge of the display—at the top when I want the bottom, or vice versa. I generally solve that problem by picking a word on the desired line and using ace-jump-mode to jump directly to that word. It turns out, though, that ace-jump-mode has me covered for that case too. If I type【Ctrl+u Ctrl+u Hyper+a】 instead of【Hyper+a】, where【Hyper+a】is the sequence I use to invoke ace-jump-mode, each line is marked and I can jump to the desired line by typing the corresponding letter.

One could argue, I suppose, that that's not any easier than picking a word on the desired line and jumping to that word but it feels more direct and somehow doesn't take as many of my ever-diminishing brain cycles to invoke. If you aren't already an ace-jump-mode user, you owe it to yourself to try it out. You'll be amazed at how much more efficient your navigation becomes.

This entry was posted in General and tagged . Bookmark the permalink.

5 Responses to TIL: Something New About Ace Jump Mode

  1. Fuco says:

    ace-jump-mode is a great idea but a *really* *really* terrible platform. Which is why I wrote better-jump (at https://github.com/Fuco1/better-jump ). It is a "LEGO"-like platform for defining arbitrary "execute action at hint" routines, which is so convoluted with ace-jump that I know of only one person who does it (abo-abo has couple extensions), and even those are so butt-ugly I'm amazed it even works (not due to him, but simply due to the horrible way AJM is coded).

    So, if you like this sort of interaction and want to have it everywhere (dired files, links in gnus/shr/w3m/notmuch/elfeed/info/help, jumping around lines, paragraphs, pages, arbitrary selections of frames or windows, variable definitions at page...) you might want to look at it. Most of the definitions are under 10 lines are immediately understandable even to novice elisp programmer. Also feel free to contribute new jumpers! :D

  2. Dominik says:

    One could also use `move-to-window-line-top-bottom` (bound to `M-r` by default) to alternate between top, bottom and center of the displayed portion of the buffer. Alternatively, `M-r` can be used with the `M-0 and `M--` prefixes to always go to the top or bottom respectively.

    • jcs jcs says:

      I think I remember knowing this at one time so thanks for reminding me. That's a lot easier than Ctrl+u Ctrl+u Hyper+a for getting to the top or bottom of the page.

  3. Xah Lee says:

    i haven't got a habit to use ace jump yet. The few times i tried, it's nice. Saves keystrokes. One thing i noticed annoying is that it'll also jump to another window (that is, emacs "frame"). Perhaps there's a way to turn that off? as i often do not have other windows visible, i.e. behind a browser window.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>