Home Download Buy Blog Forum Support

How to get autocomplete end event. (Sublime Text 2)

How to get autocomplete end event. (Sublime Text 2)

Postby Cjkjvfnby on Wed Feb 01, 2012 11:53 am

Hi,

I wan`t to change line after autocomplete finished.

Any Ideas?

PS. Am I reading proper docks? http://www.sublimetext.com/docs/2/api_r ... ntListener
There is no mention "on_query_completions" but it present in build 2165.
Cjkjvfnby
 
Posts: 20
Joined: Wed Feb 01, 2012 11:35 am

Re: How to get autocomplete end event. (Sublime Text 2)

Postby C0D312 on Wed Feb 01, 2012 9:52 pm

There currently isn't an eventlistener for when autocomplete closes/finishes. Could I ask what you're trying to do?
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: How to get autocomplete end event. (Sublime Text 2)

Postby Cjkjvfnby on Wed Feb 01, 2012 10:43 pm

C0D312 wrote: Could I ask what you're trying to do?


Just an example of current solution:

autocomplete world:
display_message

Result text looks like that:
Code: Select all
(display_message, s1),
(name, param1, param2),
(name, ...),

almost all the same template tuples. All strings starts from one of limited worlds.

I can just get content in "on_query_completions" and check what autocomplete option I need and bind one of these:
(d #autocomplete : "display_message, "
d #autocomplete : "(display_message, "
(display # autocomplete : "display_message" I can add bracket before autocomplete shown.
display_<cursor>message # autocomplete ''"(only if player chose that section else display_error_messagemessage ).

Propably I can check it on on_modified but it looks like overhead.

Is it possible to clear autocomplete selection, and stay only my?
Cjkjvfnby
 
Posts: 20
Joined: Wed Feb 01, 2012 11:35 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 9 guests