Numbered Bookmarks

Posted on by etienne

On top of anonymous bookmarks (F11 to toggle between activate/deactivate, Shift-F11 to manage), IntelliJ IDEA provides so called numbered bookmarks. What this mean is that on any line of any file managed by IntelliJ IDEA (Java, HTML, XML, JDK source files, etc.), you can define a bookmark that is identified by a number between 0 and 9. Simply put the caret on the desired line and press Ctrl-Shift-<Number> to toggle between activate/deactivate the numbered bookmark. You can then jump to such a numbered bookmark from anywhere within IntelliJ IDEA by triggering Ctrl-<Number>.
For example, place the caret at a point of interest in a Java method and press Ctrl-Shift-1. The gutter to the left will then show a tag labeled with the number 1. You can now jump to this bookmark from anywhere within IntelliJ IDEA by pressing Ctrl-1.

Personally, I find numbered boomarks very handy when working on a specific task where I have to jump back and forth between certain code locations repeatedly. It takes one keystroke to create the numbered bookmark and it takes one keystroke to jump to such a numbered bookmark. It couldn’t be any more efficient.

Technorati tags: , ,
Comments below can no longer be edited.

5 Responses to Numbered Bookmarks

  1. Esko Luontola says:

    June 19, 2006

    So that’s what that icon is all about. I once accidentally created such a bookmark and I couldn’t understand that what it was all about. It took me a couple of minutes until I was able to remove the icon.

    A informative tooltip would be helpful. It could say that it is a bookmark, which keys you need to press to go there and how you can remove it. Other bookmark types and breakpoints could have similar tooltips.

    BTW, is the keymap the only place where it is told about the numbered bookmarks? How about adding it to IDEA’s Tip of the Day? IMHO it would be useful if IDEA would automatically download new tips from the web and add them to the Tip of the Day and Productivity Guide.

  2. Alexandra Rusina says:

    June 20, 2006

    Thanks for suggestions! We’ll add this tip to the IntelliJ IDEA’s Tips of Day.
    As for other comments, it would be great if you’ll post them to our tracker at http://www.jetbrains.net/jira/

  3. Ruben says:

    October 26, 2006

    FYI: the KonaWorks PowerPack plugin (http://plugins.intellij.net/plugin/?id=1144) includes an Editor Gutter Context Menu with actions related to (numbered) bookmarks.

  4. Johnny Ruiz says:

    December 17, 2008

    This is very nice. Too bad I can only bookmark 0-9.. or is there a way to bookmark more?

Subscribe

Subscribe for updates