Reputation: 1371
Is is possible to jump to the end of a scope such as a method, loop, if statement, switch statement...etc with a keyboard shortcut?
I know this is possible with controlshiftp, but it only goes to the beginning of the closing curly brace, and not over it. For example:
This is my code.
if (x < 10) {
System.out.println("X is less than ten.");| //my cursor is '|'
}
When I press control+shift+P
my cursor jumps here:
if (x < 10) {
System.out.println("X is less than ten.");
|} //my cursor is '|'
But I want it to go here.
if (x < 10) {
System.out.println("X is less than ten.");
}| //my cursor is '|'
Is this possible?
Upvotes: 3
Views: 2096
Reputation: 16392
Your keys seemed to be mapped differently than my keys, but look in the Preferences (General --> Keys) to see exactly what commands are available for your version of Eclipse and OS. I think the closest command to what you're looking for is Run to Line (where you have to point to the line with the closing curly bracket).
Upvotes: 1