Sublime Forum

Choose a completion without move

#1

Except the best matching, I always have to move with arrow up and down, and then commit. Also, we can detect whether the completion list is visible, so we should be able to bind some keys to choose a completion with a definite position in the list under the context key, like ctrl+1, ctrl+2… or 1, 2, 3… because maybe someone seldom creates variables with numbers.

Now the problem is, it appears that the command “commit_completion” does not provide arguments about the location of completions. Is there a plugin or a method to do that? If not, where can I refer to so that I deal with it by myself? I got on_query_completion(), but I am not sure whether it is what I want. It seems to only find words and return, not about committing texts to the buffer.

Thank you.

0 Likes