Sublime Forum

Auto complete plugin

#1

Hi,

If I for example insert a C++ std::map snippet, “key” will be selected and if I press tab it’ll select “value”. It would be great if the auto complete on_query_completions api could insert a function with the full parameter list filled in, select the first parameter and on pressing tab selects the next parameter in a similar fashion as if I had inserted a snippet. Is this possible and if so how?

Also, the autocomplete popup window’s width is too small for what I want to display in it. Is there a way to resize it?

Thanks

0 Likes

Changing the size of the autocompletion panel
#2

Nevermind about the “snippet” functionality, I figured it out. You just make it return something like:

("test()","test(${1:int arg1}, ${2:char arg2})")]

I love this editor! :smile:

0 Likes

#3

EDIT: autocomplete accepts a tuple, the first being what’s visible to the user, the second what is actually inserted. Autocomplete accepts snippet notation (${1:SOME TEXT}). In more recent builds, snippet markup is hidden by from user by default.


IGNORE: Not possible, unfortunately. I hope this gets added. I think the autocomplete API could use an upgrade.

0 Likes

#4

Just to note, I also need the completion menu to handle (much) wider completions.

There is a ticket in the system, at:

sublimetext.userecho.com/topic/8 … -be-wider/

Please go upvote it so it gets some attention from Jon. (I really doubt it’s a hard change to make.)

0 Likes

#5

Stop the presses. We can have snippets in autocomplete?! :smiley:

0 Likes