Sublime Forum

Text changes after pressing tab

#1

I’m not sure if this has been brought up before, but I didn’t find anything about it when searching the forums.

I feel that this is a bug, but it could just be a feature that I don’t want.

When I type a word and press tab, sometimes that word changes in an unexpected way. Sometimes Sublime Text capitalizes it without warning. Sometimes it pluralizes it without warning. I didn’t realize that Clippy was alive and well inside of Sublime Text. Below is an example you can try for yourself where this annoying behavior exists, however the issue is not limited to the example given below.

I use javadoc comment style to comment my functions. When typing the following:

[code]/**

  • @return
    **/
    [/code]

If my cursor is after the n in @return and I press tab, Sublime Text will change that text to read @returns without inserting the tab character. Another case:

[code]/**

If my cursor is after the m in @param and I press tab Sublime Text changes the text to read @parameter without warning. This is not SUBLIME.

This issue is distinctly different from tab completion. I want tab completion. When I am editing a css file and Sublime Text shows a drop-down list of auto complete suggestions and I hit tab when one is focused, I want it to auto complete. In the case demonstrated above, I get no such auto complete drop down or any other visual indication that a replacement will occur. This has led to bugs and other unexpected side effects.

How do I stop this from happening?

0 Likes

#2

Well, it turns out that tab completion in Sublime Text doesn’t mean what I’m used to in other IDEs. On a whim I tried turning it off to see if tab would still auto complete the selection in the auto complete drop down list and to my surprise it did. I find this rather odd since the usage I have come to expect from other IDEs is that tab completion will insert the highlighted selection in the auto complete drop down when enabled, but the user has to press enter to selected it when not enabled.

Though I find this behavior odd, I kind of understand what the author was going for. I still feel like a visual indication that a replacement will occur in that case would be beneficial.

0 Likes

#3

You get anywhere with this? I run into this all the time, as our coding standards involve a lot of column alignment. I complete a named parameter with tab, then try to tab over, but my completion changes to something else.

0 Likes