简体   繁体   中英

Intellij hotkey / shortcut that will transform text into two xml / html elements e.g. aaaaa into <aaaaa></aaaaa>

I accidentally pressed some buttons and magically

aaaaa was transformed into <aaaaa></aaaaa> while editing a PHP file. I cannot reproduce the hotkey though.

Is there a way to find this specific hotkey? pretty usefull imho

If you're editing something xml-ish then you can simply press tab and IntelliJ will turn the previous word into a tag as you describe.

In your example, type aaaaa tab and you'll get <aaaaa></aaaaa> as a result.

AFAIK: this works in html, xml, and jsp, but may also work in other places

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM