Zach Smith Zach Smith - 4 months ago 21
HTML Question

sublime 3 adds extra angular bracket on autocomplete

I find on sublime 3 that if I autocomplete code I sometimes get an extra angular bracket.

for example, If I start writing

"<ht"
, I get an option to autocomplete the html tag, but the code produced looks like this:

<<!DOCTYPE html> <!-- Extra angle bracket here -->
<html>
<head>
<title></title>
</head>
<body>

</body>
</html>


Which is quite annoying. How do I fix this? I'm not sure on what other autocompletion it does this. I'd like to start using the feature more once I know how it works and if I can adjust it to my style

Answer

Okay, so I found your solution, but keep in mind, it might bug in the coming updates.

First goto your installation destination and open the folder Packages, in there open HTML.sublime-package as archive and copy all the content in a seperate folder on your desktop. In that new folder, edit the file html.sublime-snippet and change

<content><![CDATA[<!DOCTYPE html>

To

<content><![CDATA[!DOCTYPE html>

This should solve your problem.