How to jump to matching braces?

Couldn't manage to find any shortcuts in Keymap predefined for finding matching braces. Any ideas?

9 comments
Comment actions Permalink

Hi Egor,

These shortcuts should do the job:
Ctrl+[
Ctrl+]

6
Comment actions Permalink

It works! Thank you, Andriy!
How this shortcut named in Keymap BTW?

0
Comment actions Permalink

It is called "Move Caret to Code Block Start/End".

File | Settings | Keymap. Click on the Filter/Funnel icon (the one next to the Bin icon) -- now you can search for an action by its shortcut.

1
Comment actions Permalink

Found! Thanks again, Andriy!

0
Comment actions Permalink

no !

He wanted ^M 

^M -> move Caret to matching brace.

9
Comment actions Permalink

Ctrl+[ and Ctrl+] worked for me in resolving the dreaded

     "Missing }" error

at the very bottom of a 9000-line source file. Here are the steps I followed:

1. Click on the last close-curly brace in the file.

2. Type Ctrl-[ to find it's twin.

3. Is that open-curly brace is correct? If so move up to the nearest close-curly-brace.

4. Repeat until you find an improperly matched pair.

In my case I found the function that was missing a close-curly-brace in an if-clause. 

Thanks @AndriyBazanov!

0
Comment actions Permalink

This seems to be a little off for Rider for Mac.

If you are at the end brace, cursor is before or after the '}', the Command + '[' works but will take you to the function name, overshooting the '{' by one line.

But putting the cursor before or after the beginning brace, '{', and then typing Command + '[' or ']' doesn't seem to really work.

0
Comment actions Permalink

Ctrl+[ looked promising but failed to find matching square-bracket for me on Windows 10, IntelliJ 2017.1.  Possibly intended for curlys

^M might be a Mac key-map(?).

I found Ctrl+W useful to (increasingly) select the block where caret was found, then right or left arrow to place caret at beginning/end of block. 

1
Comment actions Permalink

I am on mac and can confirm that ^M did it for me! What a relief, since none of the mappings using [ worked

0

Please sign in to leave a comment.