Home Download Buy Blog Forum Support

How to act uniquely per line on tab

How to act uniquely per line on tab

Postby phobia on Fri Nov 23, 2012 1:32 pm


I need to generate different content for each instance of a keyword, when the user presses tab.

An example (pipe represents carret):
Code: Select all

now, if tab is pressed, I want it to end up something like this:
Code: Select all

How can I achieve this?

I tried using on_query_completions, but it seems to run only once per unique keyword/prefix, so the result would be e.g. "bar1" three times.

I also tried just making a TextCommand and bind the tab key to it via a sublime-keymap file, but then my plugins kills all normal tab activity. Is it possible to trigger the normal tab behavior from my plugin?
Posts: 2
Joined: Fri Nov 23, 2012 12:37 pm

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests