Sublime Forum

Autocomplete adds extra opening tag

#1

I am brand new to Sublime (any text editor, really – I’m trying to teach myself a new skill). I am using Sublime Text 3 on both mac and windows – the problem happens on both.

When I start a tag (for example, <, {, etc) autocomplete will show me options. Great! But then I select one, and the result gives me the full snippet with an extra opening tag at the beginning.

Example: <<b> </b>

I have tried to research this. It seems there are tens of forum posts about this, going back almost a decade. But there doesn’t seem to be a clear answer?

Suggested solutions I’ve seen:

Uninstall zen coding
*Okay but I literally just installed sublime today. I don’t recall installing anything called zen coding. Is this something pre-installed that I have to remove? Will removing it also remove auto-complete? (idk what zen coding even is)

Install Emmet
*What does that mean? Is that a package I should install? Is it a new kind of autocomplete? I guess I don’t understand what this is and why this would solve the issue – is the native autocomplete of sublime just bad and needs to be replaced to work properly?

Don’t type the opening tag
*This seems very daunting to relearn muscle memory and remember not to type the opening tag. Is not typing it just a workaround for the issue, or is this actually how sublime autocomplete is intended to be used? If the former, I’d prefer an actual solution to a workaround I think. If the latter… oh. Doesn’t feel very intuitive but what do I know.

In general I’m just really confused as to why this question doesn’t seem to have a clear answer after almost a decade of people asking it (at least, an answer that’s clear to the noobs like me who are asking.)

I get the impression the people answering think the solution is obvious and self-explanatory – it isn’t. Even after reading all these previous posts, I really don’t have the clarity I need to feel confident moving forward with this issue. I would appreciate – and honestly I think a lot of shy noobs like me would appreciate – a somewhat thorough answer on this once and for all so maybe we can save some future noobs who will definitely also be googling this question.

Thank you so much in advance for any time/effort put into answering this! I know it’s a very day one question, but it’s literally my day one and I guess I hope people will be understanding.

0 Likes

#2

I’m not able to reproduce this in a clean state - in fact, I have commented on this before, so it seems likely a plugin is interfering. This could be why there is no clear answer - it depends what plugins you have. But if you haven’t installed any, then I don’t understand what is going on. What build/version of ST3 are you using?

yes it’s a package, but it’s bad advice generally.

I guess it’s a package that presumably caused similar problems for other users, it is not preinstalled

agreed. this isn’t a solution :slight_smile:

1 Like

#3

To add on to what @kingkeith mentioned above, just to test this I downloaded the latest version of Sublime as a portable build, created an empty HTML buffer, and this is the result of using autocomplete to complete tags in that file with absolutely bone stock everything (the only thing I did here was enable my license):

com-optimize

As he mentioned, I think the reason you see various answers to the question are because as far as the people answering can tell, Sublime doesn’t do this unless you’ve installed some package that’s trying to be “helpful” that is not particularly well designed.

If you’ve truly installed nothing then you shouldn’t be seeing this sort of behaviour, I don’t think. Can you confirm exactly what steps you’re taking that make this happen?

1 Like

#4

Hello!! Thank you so much for answering!

It looks like I do have a few things installed (someone helped me set this up, so I wasn’t aware until I asked just now).

Things installed:
Package Control
FileManager
Renpy Language (Ren’py the visual novel engine is the thing I’m trying to teach myself)

Do these help at all in narrowing down what’s going on here?

0 Likes

#5

The RenPy language definitely includes completions, so that could be causing this. I only took a brief look but there’s a lot of them and they seem specific to the specific language that the package is supporting.

The stuff outlined above is presuming you were talking about HTML and not an external language of some sort, so there may have been a disconnect of some sort there.

You can try temporarily disabling that package (Package Control: Disable Package in the Command Palette) to see if that stops it from happening (there’s also an Enable command to put it back), but if it does then the issue is that this package is what’s forcing the “workaround” on you, as it were.

1 Like

#6

This seems to be it!!!

Thank you. Truly. This was a very discouraging day one, and at least now I know this wasn’t supposed to be happening.

I suppose next steps are to reach out to the package creator, who thankfully seems to be very active.

I appreciate everyone for helping!

1 Like