How to move out of auto-completed brackets in IntelliJ IDEA (without using the arrow keys)?
Solution 1
IDEA doesn't have such feature yet. The closest equivalent is the Complete Current Statement
editor action (Ctrl+Shift+Enter).
UPDATE
Initial implementation for this feature is available in 2018.2 EAP version - press Tab to jump out.
It works more like in MS Visual Studio - without visual indication of tab 'exit' position. For now, it should work in Java, SQL, Python and some other files. It will take some time for other languages to catch up - some language-specific code changes are required.
The feature is disabled by default, you can enable it in
Settings -> Editor -> General -> Smart Keys -> Jump outside closing bracket/quote with Tab
Solution 2
Ctrl + Shift + Enter
does not seem to work for me in IDEA 12.1.4, but I found the closest feature to what I was looking for was Shift + Enter
. This completes the line, creates a new line below the current line and moves the cursor to it.
Solution 3
You can do this by pressing the closing symbol that you would've pressed otherwise, but was auto completed. For example, if you have just typed the f below, you would press shift and 0 (or closing parenthesis), and it will move your cursor outside of the parenthesis.
String asdf = "hello world";
System.out.println(asdf);
Solution 4
I went to preferences->Keymap and set a shortcut for "Move Caret to Line End" to Shift-Space. It takes me to the end of the current line I am on without adding anything, if that's what you want.
Solution 5
Not currently supported by Intellij. There is an open feature request on this at http://youtrack.jetbrains.com/issue/IDEA-74666. Extra votes would be nice.
Related videos on Youtube
Marsmensch
Updated on May 28, 2020Comments
-
Marsmensch about 4 years
I recently switched from Eclipse to IntelliJ IDEA, and found myself wondering how to move the cursor out of a pair of auto-completed brackets.
In Eclipse after I finished typing in a pair of brackets, pressing tab brings me out of the brackets. How can I do the same thing without using the arrow keys?
Many thanks for your help!
-
markdsievers over 9 yearsThis is one of the major annoyances for me after switching as well.
-
Soorena over 7 yearsI thought that I was the only person annoyed by this problem , thanks god stackoverflow exists! :D
-
-
Paolo Fulgoni about 10 yearsThe issue has been moved to Idea Backlog 6984, which means that it won't be implemented in the nearest future
-
bmoran about 10 yearsCmd + Shift + Enter on Mac :)
-
Honghe.Wu about 9 years@PaoloFulgoni One Year passed, it is still hanged up.
-
Fuzzy Analysis about 8 yearsThis is true for WebStorm and PyCharm as well... probably all JetBrains IDEs, I'm guessing?
-
Soorena over 7 yearsyour answer was the best solution , it would've been better if we could change the shortcut.
-
Soorena over 7 yearsfrom settings => keymap => Complete ... I changed the shortcut to Alt + ~ , it's way more handy.
-
q335r49 over 7 yearsThat's pretty good... but you have to press it twice to get to the end
-
sonicblis about 7 yearsKinda funny. Defeats the purpose a bit.
-
Andrew Keeton about 6 years"Initial implementation for this feature is available in 2018.2 EAP version (just released). It works more like in MS Visual Studio - without visual indication of tab 'exit' position. For now, it should work in Java, SQL, Python and some other files. It will take some time for other languages to catch up - some language-specific code changes are required. The feature is disabled by default, you can enable it in Settings->Editor->General->Smart Keys->Jump outside closing bracket/quote with Tab." - Dmitry Batrak, Jet Brains, 16 May 2018
-
Arthur Eirich almost 6 yearsNOW this IDE is my very very favorite one. NEVER ANYTHING ELSE AGAIN!!!!!!!!!!!!! Thank you JetBrains! Even that it took so long, doesnt matter anymore! Im the happiest developer ever! Just wanted to share my happiness with you guys! YAAAY!
-
GhostCat almost 6 yearsI have to admit: jumping I dislike. I have to jump repeatedly to get to the end of the line. But I very much like the suggestion from bmoran!