Enable Auto Close Tags for HTML in PHPStorm

I recently started a new project in PHPStorm, but noticed that none of my HTML elements closed automatically, as in my other projects.

If i type

<div> 

autoload editor

 </div> 

How to enable this feature?

+6
source share
4 answers

Yes, you can do this by installing PHPstorm

Go to PHP Storm -> File -> Settings -> Editor -> Smart Keys -> XML / HTML

Check everything or whatever you want, then click Ok. It's done.

Link: http://www.jetbrains.com/phpstorm/webhelp/editor-smart-keys.html

+4
source

If you type div and then press Tab , it will automatically populate for you. As far as I know, PHPStorm has built-in emmet in versions 6 and 7.

+8
source

File> Settings> Editor> Emmett> HTML

In the Filters section, the Comment tags checkbox is turned on by default .

Then you will find if you use Emmet syntax, for example:

.test#test TAB

He will output:

 <div class="test" id="test"></div> <!-- /#test.test --> 
+7
source

In PHPStorm version 2017.3 you can change this parameter:

File> Settings> Editor> General> Smart Keys> XML / HTML> Insert closing tag when tag ends

0
source

Source: https://habr.com/ru/post/955823/


All Articles