Florian Reisinger
Florian Reisinger

Reputation: 3088

IntelliJ Producs go to last opening bracket when pressing Alt + Gr + 8 ([)

I have IntelliJ Idea 15 IU-143.381 and Webstorm WS-143.381

Given you have the following code:

int[] i = new int[3];

at some point (fixed after restart but coming again quite quickly....) I cannot do this simple thing, because I am on a German layout keyboard. For inserting a [ does not work any more.

I need to press Alt Gr + 8 to type a [.

This results into jumping to the last opening } for example. I have typed this:

public void foo(){
int

On pressing the [ the cursor moves from after int in the second row to the position after foo(){. This is continued till you are up in the class's opening brackets [in Java]. I have tried it in Webstorm with JS and there it is the same. Anyone has an idea how to fix this?

I am on Windows 10 64-bit, German UI and keyboard layout.

Upvotes: 9

Views: 2119

Answers (2)

user5490797
user5490797

Reputation:

Reset IntelliJ/Webstorm/another Jetbrains product's settings by deleting the user preferences folder (for exemple C:\Users\[user]\.IdeaC-[version] in Windows), then when you are told about "smart keyboard shortcuts", then just ignore it and it will never reappear again.

Just remember that this will reset your other preferences too.

Upvotes: 5

Floern
Floern

Reputation: 33904

I had the same issue with Android Studio 2.0, which is based on IntelliJ. I'm using a Swiss German keyboard layout, on which in have to press Alt Grü to write a bracket [, and Alt Gr! for a ] respectively.

For some reason this matches the keyboard shortcut for "Move Caret to Code Block Start", which was registered as Ctrl[. Same for "Move Caret to Code Block End" with Ctrl]. Looks like IntelliJ cannot handle this correctly.

To fix the issue, I simply removed those shortcuts in File > Settings > Keymap.

Upvotes: 3

Related Questions