Sublime Forum

Autocomplete not appearing in a certain case - immediately after a - sign

#1

The problem I found is that autocomplete doesn’t appear when typing after the - (minus) sign/symbol. Example:

int test = 1; int test2 = 2; test2 = test2-test; //"test" should be recommended by the autocomplete module, but it doesn't happen.
I think this is a bug, because this doesn’t happen when using +, /, or * in the same context, so this works as expected:

int test = 1; int test2 = 2; test2 = test2+test; //"test" is featured in the autocomplete module.

If this is a bug, how come noone has mentioned it before? If ST3(this is what I’m using) can be configured to remove this problem, please tell me how. If it’s not a bug, then this is logically inconsistent, since all the other math symbols I tried with produce no problems.

0 Likes

#2

It looks like it might be a bug. Just because no one has mentioned it doesn’t mean it isn’t a bug. If I had to guess, it’s some issue with how word separators are handled, and for whatever reason “-” is being treated differently. If I had to guess why it hasn’t come up before, perhaps because people put a space in between the variables and the minus (so “test = test2 - test”), which seems to solve the problem (also led me to believe it’s a word separator issue).

1 Like

#3

I searched for word separators and found the setting “word_separators”. According to the settings file the minus sign is a word separator, but it doesn’t matter if you delete this character from the “word_separators” option or not, the behaviour is always as if it’s ignored to be there. So it can never be a word separator. Therefore, I’m 100% certain this is a bug.

0 Likes

#4

It is 3 years since this topic was created. The problem seems to remain unsolved. Does anyone know work arounds other than the one skuroda suggested? skuroda’s suggestion is valuable, but in some cases space character before minus sign is not suitable.
Thanks in advance. (Sorry for my poor English)

0 Likes

#5

Correction: “Space character before minus sign” -> “Space character after minus sign”

0 Likes

#6

Open it on the issue tracker: https://github.com/SublimeTextIssues/Core/issues, if it is not already there.

0 Likes

#7
0 Likes

#8

Thank you, addons_zz and kingkeith. I didn’t know the page on GitHub. I have found there are at least two open issues related to this topic, #124(the one kingkeith taught) and #456.
Though it seems that both of them have been inactive for more than two years, I’m happy to know that there are OPEN issues on this topic.

0 Likes

#9

You may up them:

Use Github’s reactions feature to vote on issues.

0 Likes

#10

Thanks. I have just done. I hope it will be fixed soon…

1 Like