Navigate to nearest right }
Hi!
Is there a way to move out side of nearest } without my hands leave it's position? I can certainly use DOWN and RIGHT keys but my right hand must leave "hjkl"-position.
Ctrl+] moves to left of }. Then I have to press RIGHT key to move to right side.
I have PC-keyboard.
Following is the scenario:
I write: public int foo() {
and press ENTER, intellij completes } automatically, so I have
public int foo() {
}
and my cursor is at the middle blank line. I type: return 0;
Now I want to move to after } so I can type next method quickly. Everytime my hands leave the original position is a productivity loose. :-)
/Wei
Please sign in to leave a comment.
i use ctrl+] and then shift+enter
actually it is double shift+enter
upd:
i've record macro and bind it to ctrl+alt+]
How about Control + Shift + Enter twice? It looks to me to do exactly
the job.
Vaclav
Yuwei Zhao wrote:
it works only after return statement
if your method doesn't end with return statement ctrl+shift+enter won't go outside method
and author wants shortcut to go outside any {} block, not just outside methods
Thanks a lot. It works well.
Thanks Wi Wi, it works well.
The VI emulation plugin (IdeaVIM) will let you use hjkl to navigate around instead of arrows. This is why I like the VI plugin, almost never have to remove hands from home row.
Thanks, I am not aware of its existence. It's a great tip. The productivity can be increased even more.