Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close last open tag using shortcut key (instead of </)

Tags:

phpstorm

Is there way to assign a shortcut key to Auto-close the last open tag?

Right now I have to type </ for it work.

In NPP, I used to press Ctrl+. and it would automatically insert the last open tag without even prompting. Much easier than typing </ and selecting from a list.

Is there any plugin or feature of phpstorm that can accomplish the same thing?

Thanks!

P.S. Also since this is related, is there a way to move the cursor to the matching tag. If my cursor is on <div id="one"> can the cursor automatically move to the closing tag (or opening tag if my cursor is at the closing tag) using a keyboard shortcut? thanks

like image 202
supersan Avatar asked Apr 30 '15 13:04

supersan


People also ask

What is the shortcut key of open and close?

Alt + F4 is a Windows keyboard shortcut that completely closes the application you're using. It differs slightly from Ctrl + F4, which closes the current window of the application you're viewing. Laptop users may need to press the Fn key in addition to Alt + F4 to use this shortcut.

How do I close open tags?

An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).


1 Answers

You can use Complete statement [Shift+Ctrl+Enter] command.

<strong>Text[Shift+Ctrl+Enter]<strong>Text</strong>

like image 61
Tomáš Fejfar Avatar answered Oct 29 '22 22:10

Tomáš Fejfar