XHTML closing slash in any file

Hi!

I'm a new user of PhpStorm. It's great (almost: it's lacking local/remote comparison for dirs/project, and perhaps some other minor things I didn't find yet). Thanks JetBrains for the tool - I'm going to switch to PhpStorm from our polish most popular professional website editor Pajaczek NxG (www.pajaczek.pl).

After about of 10 days of daily using PhpStorm I still haven't found how to force editor to properly close single XHTML tags with /> in my PHP files? I know, that if I type <br and then press / i get the proper <br/>. But when I type <br> it's not replaced to proper <br />. The same with ZEN: i type br, then press TAB, and I have: <br>... The same with other single XHTML tags: img, input etc.

I already know, that slashing is OK, while editing .xhtml files. But what, when I have .php file that has XHTML inside (in-line as in echo or print, or outside of php block)? How can I force PhpStorm to properly close tags anywhere I use XTHML? It could be some option in project settings or something... but I haven't found antything like that.

Any help is appreciated. Thanks guys. :)

2 comments
Comment actions Permalink

Settings | Template Data Languages. Choose your PHP files or directories and select XHTML as template language for them.

0
Comment actions Permalink

Thanks a lot, Eugene! :)

Now I know, that I haven't walked trough all settings, thou I've thought so... ;)

0

Please sign in to leave a comment.