Java Reference
In-Depth Information
Sometimes you aren't interested in your previous navigation steps but
rather wish to return to the last place you made a change in your code.
You can return the cursor to the location of your last edit by pressing
Ctrl+Shift+Backspace or by selecting Go To | Last Edit Location . This
command even works from within another file. Using it multiple times
continues to move back through your editing history, edit by edit.
TIP
Table 2.3 Like most mature editors, IDEA provides a number of keyboard shortcuts for navigation
within a file, including a few specific to code navigation (such as method-by-method and brace-by-
brace navigation).
Shortcut
Moves the cursor…
Alt+Down, Alt+Up
To the next/previous method in a Java file or the next tag
in an XML or HTML file
Home, End
To the start/end of the line
Ctrl+Home, Ctrl+End
To the start/end of the file
Page Up, Page Down
Up/down one page
Arrow keys
In the appropriate direction
Ctrl+Page Up, Ctrl+Page Down
To the top/bottom of the screen
Ctrl+M
To the middle of the screen
Ctrl+Alt+Left arrow, Ctrl+Alt+Right arrow
Back/forward one navigation step
Ctrl+Shift+BackSpace
To the previous edit position
Ctrl+[, Ctrl+]
To the code block's start/end
Gtrl+G
To a line
F2, Shift+F2
To the next/previous highlighted error
Enabling the Home and End smart keys
Normally, the Home key moves your cursor to the start of a line: the first column.
However, if the Home smart key option is enabled through the editor settings,
the Home key jumps to the logical start of the line, instead, which is defined as the
first nonspace character. Think of this option as redefining the Home key to go to
the start of the code rather than the start of the line. Pressing the Home key again
places you at the first column, so both behaviors of the key are still accessible.
The End key normally moves you to the end of the current line. As with the
Home key, enabling the End smart key option changes the End key's behavior so
it moves to the logical end of the line rather than the physical end. However, the
 
 
 
 
 
 
Search WWH ::




Custom Search