[TxMt] CodeCompletion Snippetization

thomas Aylott oblivious at subtlegradient.com
Thu Dec 21 22:31:58 UTC 2006


Ahoy TextMateys!

Prototype'd Javascript now has better escape code completion
and option-escape menu code completion.

Also,

I updated my TextMateCodeCompletion thing again to support basic  
snippetization of completions.
Prototype completions contain a bunch of method arguments. Like this:  
Thing.method(one,two)

Now, when you select a completion from the menu, it'll convert each  
of the method arguments into snippet placeholders.
This is, of course, just a milestone in the road toward full snippet  
completion support.

The eventual goal is that the completions list is just a list of the  
names, then when you select one, a unique snippet is inserted for  
that name.

The only problem is that we'll either have to duplicate all of the  
completions in the escape completions list and the menu completions  
list or else extend the completions list format to work with both  
escape completion and menu completion.

I think the only way to extend the format is to get Allan to hack  
textmate to support the new version. And I loathe the thought of  
wasting my time implementing it one way and then having to  
reimplement it the right way once Allan gets back.

I also reorganized the codecompletion library so that it can more  
easily be used by other stuff. New methods:
	to_snippet	converts the choice you make into a basic snippet and  
returns a string. (formerly to_s)
	choice	returns the choice that was chosen as a string
	index	returns the index of the array of the item that was chosen

thomas Aylott — design42 — subtleGradient — CrazyEgg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061221/8070b156/attachment.html>


More information about the textmate mailing list