sublime 3 adds extra angular bracket on autocomplete

1.6k Views Asked by At

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

4

There are 4 best solutions below

3
On BEST 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.

0
On

Don't start off the tag with <. Just type ht and then press Tab, and you'll have your desired result. The same goes for any other tag.

p + Tab will create <p></p>, etc.

1
On

It may be that you have a conflicting package. I had this issue with the "HTML5 Bundle" but as soon as i removed it the problem went away. Hope that helps

0
On

I just uninstall the HTML5 package from Package Control (Ctrl + Shift + P)/ Type "Remove Package" and select the packages related to HTML and it works!