Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

keyboard shortcuts - IntelliJ IDEA find matching parenthesis / bracket

Is there any keyboard shortcut to navigate from one parenthesis ( to the matching one ) in IntelliJ?

Or even to "jump to the next opening/closing parenthesis (/) from wherever my cursor is"?

And, if there's no way to do it 'natively', are there any plugins that could add this functionality quickly and easily?

EDIT: the best solution I've found is added as a comment in liango's answer below, namely to put the cursor on the first or last brace and then press CTRL-W twice. Not ideal, but it does the job!

question from:https://stackoverflow.com/questions/23406380/intellij-idea-find-matching-parenthesis-bracket

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  • You can use Ctrl + [ and Ctrl + ] to navigate to a code block's start and end.

  • You can also use Ctrl + Shift + M to navigate between the start and end of a code block.

On Mac, you can use Option + Cmd +[ and Option + Cmd + ], and Ctrl + M


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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...