Select private tag in HTML with Intellij / PyCharm
I cannot find the key element or the option to select the element's closing tag. Let's say that I am sitting in an opening tag div
, I want to be able to select the closing tag to be able to change that, for example, section
or header
.
I can use Add Select for Next Occurrence
, but if there is some in the element I want to change div
, then obviously it selects them as well.
source to share
You can use CTRL+ [to navigate to the opening tag and CTRL+ ]to navigate to the closing tag.
By the way, there is an easier way to rename the tag. Once you have the opening tag selected, you can simply press SHIFT+ F6(rename refactoring) to change the tag.
Another way is to change the opening tag (say from div to section), click ALT+ Enterand choose to rename the end tag 'div' to 'section').
Update . IntelliJ 14.1 also introduced a new feature called Simultaneous Tag Editing , which makes renaming tags even easier.
source to share