Java Reference
In-Depth Information
Figure 13.1
An anonymous bookmark
and a numbered bookmark
13.1.1
Placing and using numbered bookmarks
To place a numbered bookmark to the current line of code in the editor, hold
down Ctrl+Shift and press one of the digit keys, 0-9. The bookmark icon with
that number appears in the gutter next to the current line. Once placed, num-
bered bookmarks are accessible via a quick, one-step navigation sequence:
hold down the Ctrl key and press a digit key to instantly jump to the corre-
sponding bookmark.
The nature of the shortcuts means you're allowed a maximum of 10 numbered
bookmarks in any one project, so use them wisely! You can always remove a book-
mark and set it again somewhere else once you're through with it. Holding
Ctrl+Shift and pressing a number for a bookmark that already exists will remove
it; you can also select Edit | Toggle Bookmark or pressing F11 while on the same
line as the bookmark.
13.1.2
Placing and using anonymous bookmarks
An anonymous bookmark is indicated by a checkmark icon. Unlike numbered
bookmarks, you can create as many anonymous bookmarks as you like. To place
an anonymous bookmark on the current line of code, select the Edit | Toggle
Bookmark command or press F11 . A bookmarked line has a checkmark icon in
the gutter area to the left of the line. Pressing F11 again turns off the bookmark.
You can also toggle a bookmark on a line of code by holding down the Ctrl key
and left-clicking in the gutter next to the line. You can't set a numbered book-
mark and an anonymous bookmark on the same line.
Although numbered bookmarks have a special shortcut (that's the real benefit
of numbered bookmarks—the ability to navigate to them with a split-second key-
stroke), anonymous bookmarks don't. You have to use another bookmark naviga-
tion method.
IDEA gives you two ways to jump to any bookmark entry in the current docu-
ment. First, you can click the bookmark's black mark in the right-hand marker
bar. The cursor then scrolls to the selected bookmark.
IDEA also lets you navigate through your bookmark collection sequentially.
Select Go To | Next Bookmark or Go To | Previous Bookmark to move back and
forth among all the bookmarks in the current document. When you reach the end
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search