The best way, IMHO, would be to have a DWIM key.Good point. It is even 4 different multi-keystroke combinations when you include TAB for live templates. To do Neil's DWIM (a.k.a. SupraGenius completion) well, a layering approach is necessary that would take some thought to design and implement but would be well worth the effort. Keeping with Carlos' suggestion to refactor, here the concept refactored although not fully thought through. Using the TAB key as the trigger (and addressing Rodrigo's concern), TAB should move from the specific list to the general list with the most general being the Basic completion and the most specific perhaps being live templates. The first TAB should cycle from the most specific list to the most general list and offer options when one of the lists has options. If that 1st TAB offered a list from a list besides the most general, an additional TAB should start the cycle moving toward the more general lists. Perhaps the TAB in the sequence after the most general match would cycle you back to a more specific list. Often one of the 3 lists besides Basic will be skipped not because there are no matches but because the context is wrong such as skipping SmartType when there is no type context.
DWIM stands for Do What I Mean.
Right now Idea is very close to this functionality, but the functionality is broken up
into different pieces. I still can't keep straight what Ctrl-Space vs. Ctrl-Shift-Space vs.
Ctrl-Alt-Space does.
I would like 1 key that would DWIM (perhaps 'complete the next token' is a different
way of stating what that key would do).
Having this functionality split into 3 different keystrokes just doesn't work for me.
Neil
The ultimate support for programmer's laziness... just keep hitting TAB until it gives you what you want and that TAB will usually get the goods the very first time and in the extremely unlikely worst case scenario it will produce in about the same number of keystrokes as Ctrl-Shift-Space or Ctrl-Alt-Space. Between the current 3 code completion options and live templates, an undercaffeinated programmer might take as many as 9 keystrokes to get to what they want if they don't break a finger in the process. <grin>
Jon
At 01:20 PM 4/4/2002 -0500, you wrote:
Jon Steelman wrote:
Valentin Kipiatkov wrote:P.S. I agree that such automatic mixing could be confusing to a novice, and that's why I'm suggesting the new GeniusType completion that leaves the original ones untouched. It could be off by default. It's documentation could explain it and suggest only enabling it after understanding/mastering the other completion types.
So then how about adding "GeniusType" completion? ;-)
But -- this was requested often -- wouldn't it make sense, if the
SmartCompletion falls back to BasicCompletion if there are no smart suggestions?
This might make understanding of SmartType completion harder for novice users, I think.
...and keeping the current SmartType and Basic completion? It's an approach I suggested yesterday that gives a new combination completion. Here it is again--
This "GeniusType" combination completion would be in addition to the current Basic & SmartType but build off them. I would consider mapping it to the Tab key. Here's one way it could work to deal with your original objection and satisfy my goal:
* 1st tab pressed-- invoke SmartType if anything matches type else invoke Basic on 1st tab
* 2nd tab pressed-- invoke Basic (if SmartType was successfully invoked on 1st tab)
Thanks,
Jon
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list
