Sublime Forum

Auto-complete of tags when typing </

#1

How do I get it if I put a tag before a text, <strong> for example:

<strong>how to do it right</ …

that if the characters </ are set after the text, that …strong> is automatically completed?

0 Likes

#2

You might wish to checkout this plugin:

To really power up your HTML development, I would very much encourage EMMET:

EMMET is a Swiss-army knife of HTML development. It includes tag auto-closing, wrapping and expansion

1 Like

#3

@gbird Many thanks, I will definitely use Emmet.
html tags seem to close automatically anyway when I have html files.
If I have php template files, then not. A short template.php example:

<?php
echo "<td class=''>
	$item->field
</td>";

The auto close is apparently related to the file format, so unfortunately it doesn’t work in situations like this?

0 Likes

#4

Builtin auto-closing works if you write them as actual HTML instead of inside a string, eg:

<td class=""><?php $item->field ?></td>
0 Likes