Sublime Forum

Autocomplete issue

#1

When you press Enter at this point it will “confirm” completion instead of going to the new line.

But there is nothing to complete, because I typed ‘then’ manually and expect Enter to start a new line. To do that I have to hit the Enter twice.
After ‘then’ I have to hit the Enter twice for ‘else’ and even for ‘end’ :smiling_imp: The language is Lua, I haven’t tried with other languages (just trying Sublime Text out). This is in Sublime Text 2 beta 2181.

Oh, forgot to say that I’m very impressed with the author’s sense of style and attention to details.

0 Likes

#2

Add this to Preferences > Settings - User: "auto_complete_commit_on_tab": true Now autocomplete will commit on tab so that enter will always give you a new line.

0 Likes

#3

Let’s just hope the issue is simply that vitalyx wanted to disable auto complete commit on tab. Because from the description, it’s almost as if he/she wants autocomplete to know when it’s about to replace the text with what’s already there and if so pretend it was never involved.

Thus, in this case if vitalyx had pressed down once to have the second autocomplete suggestion, enter should add it. It’s only if the suggestion is the same as the text typed that it should not. Similarly if auto_complete_commit_on_tab was set to true, pressing tab here should give a tab character.

If that is the case (maybe it’s not) I think it’s a good point to make. Definitely a nice to have, though.

0 Likes