Sublime Forum

Emojis affecting autocomplete in HTML documents

#1

I faced a problem when the autocomplte feature stopped working correctly in one of my .html documents.

Specifically, when I typed ".foo" + "Tab" l expected it to generate <div class="foo"</div> while it generated .<div class="fo"></div> so it left the dot and removed the last letter from the class name. After some searching, it turned out that I had an emoji up the document (:sob:) removing which solved the issue.

0 Likes

#2

which plugin are you using that autocompletes .foo to a div? probably you should log the issue on that package’s issue tracker

0 Likes

#3

I have Emmet installed. However, I thought this is a built in feature as well, because when I removed Emmet, the autocomplete still worked and had this issue.

0 Likes

#4

when I try on a clean install of ST, I get .<footer></footer>, so maybe you have another plugin affecting this?

0 Likes

#5

You have a dot before <footer> is that a typo? I had three plugins installed (Emmet, Rempx and Calculator). All all them have been removed before doing the test. Also downloaded and installed a fresh version which gave me the same results (before I found out it was becasue of the emoji.

0 Likes

#6

no, it’s not a typo…

.foo isn’t tag.foo, so it is not completed automatically out of the box, so it takes the word before the caret - foo, and completes the element - footer, leaving the dot in place…

typing div.foo Tab works as expected, even with emojis somewhere before the caret in the document, hence why it seems you have a third party plugin that is bugged

0 Likes