Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to get out of parenthesis in IntelliJ (or possibly other IDE as well)

Let's say | is a cursor pointer. What I want to do is to get out from parenthesis once I finish typing paremeters. In step by step explanation:

// 1: type function name
void function|

// 2: openening paren automatically generate closing paren for convenience
void function(|)

// 3: type paremeters...
void function(42|)

// 4: ...and get out of parenthesis!
void function(42)|

Usually I use right arrow to do that, but using arrows are not so convenient, and I wonder if there's any shortcut for this. What I'm curious at is IntelliJ's, but it would be very nice if you can tell me shortcut of any other Jetbrain IDE or Visual Studio, etc.

like image 885
Jongbin Park Avatar asked Oct 21 '25 03:10

Jongbin Park


2 Answers

I think you are looking for Ctrl + Shift + Enter (on Windows). The Action name is Complete Current Statement

On Mac if you want to know the shortcut invoke Command + Shift + A (Find Action) then type Complete Current Statement it will show you the shortcut for the action as well

enter image description here

like image 71
A0__oN Avatar answered Oct 24 '25 00:10

A0__oN


The shortcut you're looking for, on most keyboards, is shift+0 -- this won't work on the keypad, only the main numbers at the top of the keyboard. Technically this isn't a shortcut, you're actually typing the close parenthesis, but IntelliJ is smart enough not to double up on them so it's as good as a shortcut in this case.

like image 23
Software Engineer Avatar answered Oct 24 '25 00:10

Software Engineer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!