Sublime Forum

Bug in XML autocomplete?

#1

There seems to be a bug in the new XML/HTML autocomplete:

When I type the following, ST auto-completes the tags. The cursor is the | and what follows is what is auto-completed.

Tags like or should not be closed by the auto-complete with a matching tag.

</|tag> <-- OK

</|input> <-- FAIL

I use Win7, 64bit, build 3020.

0 Likes

#2

Yes. This is very very hard for me to work around while I am coding. Is there anything we can do about this?

0 Likes

#3

Well, clearly the best case would be it fixes to it. But if it is slowing you down to much, you can always disable it by adding the following to your user preferences.

"auto_close_tags": false
0 Likes

#4

I really appreciate that tip. Quite helpful.

But it is really throwing the baby out with the bathwater to do that.

I have been waiting and waiting for xml tag autocomplete and it is crazy frustrating to have it, but not be able to use it.

For example, in my particular xml documents I assemble PAGES containing layouts of IMAGES.

so



I CAN’T type in this instance because sublime erroneously autocompletes to it is not only incorrect, it is debilitating, I have no opportunity to even hit delete before it autocompletes, it instantly inserts the incorrect tag so I have to hit delete 5 times and then retype the tag and close it.

Yes, I can completely disable autocomplete but for someone doing a lot of XML by hand, it is a non-trivial loss.

0 Likes

#5

If you haven’t already, try the latest dev build.
sublimetext.com/3dev

0 Likes

#6

Fantastic! Thanks!

0 Likes