Sublime Forum

Auto-completion in multiple selections

#1

I would be awesome if auto-completion would work within multiple selections.

Suppose you have a file with this following content:

first_keyword
second_keyword

first_to_change
second_to_change

If you write in a new row “first_k” and press Tab you will get “first_keyword”. That’s correct as expected.

If you select both “to_change” and type “k” and press Tab you will get a new tabs. although you could expect tot get “first_keyword” in the first selection and “second_keyword” in the second selection, since the auto-completion would be logical.

0 Likes

#2

Might sound logical at first, but when you start with more complex scenarios than you example it quickly becomes infeasible.

You can have multiple selections that exceed the current view port, i. e. you can’t see what is being inserted. Or you would not want to complete the first suggestion for some of the selections but not all, which would be a ui nightmare because the number of possible selections is almost limitless.

This is why completion only works if all selections have the same “prefix” and thus would complete to the same text.

0 Likes

#3

You’re right… On the other side, if the user does not want the auto-completion, he/she doesn’t have to press the Tab at all. At least I would like to have this as an extra option that I can turn on or off. I guess it’s a “nice to have”.

0 Likes