Generating Completions for AutoComplete

General Discussion goes here.

Moderator: robert

Generating Completions for AutoComplete

Postby jrose » Mon Jul 30, 2012 2:46 am

Is is it possible for me to create a parameterized completion and insert it with out opening the autocompletion description and list windows? What I want to be able to do is insert

(search-replace [search-string] [replace-string])

where the form supports tabbing through the params etc.

Posts: 15
Joined: Wed Jun 06, 2012 6:26 pm

Re: Generating Completions for AutoComplete

Postby robert » Tue Jul 31, 2012 3:19 am

How do you envision the user instigating the completion without the popup? Do you want it to start automatically after, say, typing "(search-replace"? Or typing Ctrl+C after that string automatically inserts the parametrized completion? Or something else?
User avatar
Posts: 852
Joined: Sat May 10, 2008 5:16 pm

Re: Generating Completions for AutoComplete

Postby jrose » Tue Jul 31, 2012 6:46 am

What would really be ideal is if I could just make a completion and insert it where ever the caret is or at a specified location. For my project I have a central REPL command line type interface which is where I want to have all applications commands take place. So instead of cmd+F opening a search GUI I am focusing the REPL component, appending a new command line, and then just inserting my search command and moving the caret back to be inside the quotes

=> (search "|")

=> (search-replace "|" )

what would be perfect for me though is the parameterized completion being able to be inserted then have the completion focus to handle being tabbed through

=> (search-replace [search-string] [replace-string])

Lastly, not sure if it would be too unconventionally for the AutoComplete classes but it would be really great if the event that is fired when a user hits enter and completes the completion could be accessed. I am attaching a key handler to the REPL RSTA that grabs the last form after the prompt => and then sends it on to the REPL process. If I could somehow hook an event listener up to the Completion, completed event I could bypass the need to hit enter to complete then enter to submit.
Posts: 15
Joined: Wed Jun 06, 2012 6:26 pm

Return to General

Who is online

Users browsing this forum: isabelkl1 and 1 guest