2

If | is my cursor position

 List<String> words = Arrays.asList(|"all cats are grey".split(" "));

Then I would like a shortcut to jump to the closing bracket

 List<String> words = Arrays.asList("all cats are grey".split(" ")|);

Note, as per this question the shortcuts Ctrl+{ and Ctrl+} work for jumping between braces { } but not for brackets ( )

Note 2: with standard IntelliJ keymap

Community
  • 1
  • 1
Andrew Spencer
  • 15,164
  • 4
  • 29
  • 48

3 Answers3

3

It looks like there isn't a specific action to move cursor to the matching bracket.

This does it in 2 keystrokes and is the best I've found: Ctrl+W which selects the block up to the matching bracket, then

That's almost as quick, and better than switching to the mouse.

Andrew Spencer
  • 15,164
  • 4
  • 29
  • 48
  • 1
    Useful tip, just one note: when the method call has multiple arguments (`foo("a", "b")`), you will have to press CTRL+W twice to get to the closing bracket. – Bohuslav Burghardt Sep 30 '15 at 10:10
3

Ctrl + Shift + M

(on Windows)

Now, there is actually an action called Move Caret to Matching Brace, that does like in the question.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
tkalvin
  • 71
  • 1
  • 8
2

I don't think there exsists a shortcut for round parenthesis. I am working with ItelliJ for years, never found one.

Ctrl +Key depends on your Keymap. You can change it in Settings -> Keymap -> [Keymaps:]. I haven't found round parenthesis, but i could have overlooked it.


Edit: A possible solution would be, to install the Plugin IdeaVim and use Shift + %

http://vim.rtorr.com/

rTJ
  • 19
  • 6