How to exit automatically filled brackets in IntelliJ IDEA (without using the arrow keys)?

I recently switched from Eclipse to IntelliJ IDEA, and I wondered how to move the cursor from a pair of automatically filled brackets.

In Eclipse, after I finished typing a pair of brackets, pressing Tab takes me out of the brackets. How can I do the same without using the arrow keys?

Many thanks for your help!

+94
intellij-idea autocomplete
May 7 '12 at 11:59
source share
10 answers

IDEA does not have this feature yet. The closest equivalent is the action of the Complete Current Statement editor ( Ctrl + Shift + Enter ).




UPDATE

The initial implementation of this feature is available in version 2018.2 EAP - press Tab to pop up.

This works more like in MS Visual Studio - without a visual indication of the position of the "exit" tab. At the moment, it should work in Java, SQL, Python, and some other files. Some languages ​​will take some time to catch up - some code changes for a particular language are required.

The function is disabled by default, you can enable it in

Settings β†’ Editor β†’ General β†’ Smart Keys β†’ Jump beyond the closing bracket / quotation mark using Tab

enter image description here

+74
May 7 '12 at 12:08
source share

Ctrl + Shift + Enter doesn't seem to work for me in IDEA 12.1.4, but I found that the closest function 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.

+11
Jul 16 '13 at 15:56
source share

You can do this by clicking the close symbol, which you would otherwise have clicked, but it was automatically completed. For example, if you just typed f below, you have to press shift and 0 (or close the brackets) and it moves the cursor outside the brackets.

 String asdf = "hello world"; System.out.println(asdf); 
+8
Jan 21 '15 at 1:51 on
source share

I went to Settings-> Keymap and set a shortcut for "Move Caret to Line End" in Shift-Space. It brings me to the end of the current line I'm on, adding nothing if that is what you want.

+6
Apr 12 '16 at 20:20
source share

Intellij is not currently supported. There is an open feature request at http://youtrack.jetbrains.com/issue/IDEA-74666 . Extra voices would be nice.

+3
Oct 31 '13 at 4:12
source share

Intellij maintains the ctrl + shift + m link, which jumps to the end of the block:

https://www.jetbrains.com/help/idea/2016.2/navigating-to-braces.html

+3
Oct 12 '16 at 9:11
source share

This is not exactly what you are looking for, but you can enter a character that you are trying to move beyond (for example, a closing pair), and this should push you beyond the automatically filled character.

Not perfect, but functional as far as I tested it.

+2
Dec 03 '12 at 18:05
source share

I set the following settings:

1) I added a semicolon to End current expression :

enter image description here

Instead of using the for command, I use the fori command (because the command for needs a semicolon):

enter image description here

2) I added the Alt + Semicolon keyboard shortcut to Move Caret to the end of the code block :

enter image description here

So, when I am inside the loop by pressing Alt + Semicolon , the jumping end of the bracket, by pressing the Semicolon , I display the brackets afterwards.

By adding these shortcuts, the encoding speed will be faster.

+2
Apr 10 '17 at 21:03 on
source share

This key is called "End".

You can assign any unused shortcut to the action "Move the carriage to the end of the line" in "Settings / Settings | Key".

PS You can use Ctrl + Shift + Enter to complete your statement (in your case, it will place the cursor at the end of the line and add ";" there) - an action called "Full current expression" and the shortcut can be checked / changed in the same way as described previously.

+2
Aug 02 '17 at 0:42 on
source share

If you decide to return to Eclipse and use PyDev, this function is disabled by default, first switch to the PyDev perspective, and you can enable it by choosing Preferences> PyDev> Editor> Enter> Include Link when closing brackets or closing literals.

0
Dec 25 '17 at 19:35
source share



All Articles