Intellij IDEA Find Matching Tag

Is there a shortcut or where can I click to find the corresponding tag markup tags and bring focus / cursor there?

For example, <p><span></span><div></div></p>

If my cursor is on the closing tag </p> , I would like IDEA to bring me to the open tag </p> .

+16
intellij-idea
Mar 09 2018-11-11T00:
source share
2 answers
  • Ctrl + [ goes to open tag
  • Ctrl + ] goes to the closing tag

The action is called Move caret to code block end/start , and the hotkey can be changed in Settings | Keymap Settings | Keymap

IntelliJ 2017 for Mac shortcuts:

  • Alt + Command + [ goes to open tag
  • Alt + Command + ] goes to close tag
+27
Mar 09 2018-11-11T00:
source share

In IntelliJ 2016 for Mac, this command looks like this:

  • Command + Shift + M goes to the corresponding tag / brackets
+2
Dec 21 '16 at 16:57
source share



All Articles