[TxMt] TextMate Code Completion (Tasks)

Sam Aaron sam.maillists at googlemail.com
Thu Dec 7 15:49:21 UTC 2006


Hey there all,

Thanks for getting this idea of off the ground Thomas. I'm really  
pleased that we're starting a potentially fruitful dialogue on this.  
I think that it's a great idea - particularly for languages where it  
is simple (I'm thinking html, css here). Also, there has been a lot  
of talk about whether code completion for dynamic languages such as  
Ruby is even possible, however I think that if we follow the 80/20  
rule, we don't need to aim for perfection, just to help people in the  
majority of situations.

Also, I'd like to suggest that we actively build a corresponding  
suite of tests alongside the development of this tool/library/suite.

It would be great to be in a position to say 'hey, the code  
completion doesn't work as expected for this case, so I've written a  
test to capture it, and here's a corresponding patch to fix it'. I  
feel we should follow the Rails implementation methodology and not  
allow patches/improvements without corresponding tests.

The important things here aren't just that we'd get fixes for things,  
and tests to make sure the bugs never return, but we start to create  
a language to help define what we collectively 'expect' from a code  
completion tool, as I'm sure there is a bit of ambiguity here.

Cheers,
Sam Aaron

----
http://sam.aaron.name

On 7 Dec 2006, at 3.06 pm, thomas Aylott wrote:

> Ok. There are now a bunch of people that have signed on to work on  
> this thing.
>
> Time to start divvying up the workload.
>
> #1: First, we need a Ruby Class for the core essentials of the  
> completion stuff. It needs to:
> 	Be an external library that can be called from a hundred different  
> tmCommands
> 	Be fully runnable from the terminal by manually passing in all the  
> arguments (so, use the TM_* vars only as fallback)
> 	Get the text you're in the middle of writing
> 	Get the list of completions based on that text from somewhere (see  
> #2)
> 	Show the menu and let you make your selection
> 	Return a snippet with the results
>
> #2: To go with the first one, we need to define the format that the  
> list will be in. Plist format, simple or xml or binary
> 	This list will either be:
> 		the contents of a static file or
> 		a command that returns the list in the necessary format
> 			(this is where you could write something smart to parse stuff)
> 	I'd like to use the .completions file extenstion,  
> maybe .tmCompletions ?
> 	Eventually we could pressure Allan into more advanced support for  
> it ;)
>
> Once we have the basic format (#2) and the basic completer (#1), we  
> can… (#3)
>
> #3: Start writing static plist lists of completions. This is not  
> ideal for all languages, obviously, but will make the completer  
> useful quickly. Best for code like HTML that is just what it is.
> 	HTML 4
> 	XHTML
> 	CSS
> 	JavaScript Core Stuff
>
> #3.5: tmCompletions generators.
> 	Maybe something that will parse your entire Rails application and  
> manually create a code completion list of all the Classes and methods.
> 	Maybe something to convert an hdoc into a codecompletion list
>
> While some people are busy with #3, other people can get on with #4
>
> #4: My real goal of this whole thing. Dynamic lists.
> 	I figure this part will take the form of various plugins for  
> various languages and libraries and your own personal code  
> libraries and whatever you like.
> 	Could be based on stuff done in #3.5
> 	We need to work with #1 and #2 to make sure everything needed for  
> #4 is available and extendable.
> 	
>
> Ok, so who wants to do what?
> Personally, I want to do all of it, but i have a job and a family  
> and other stuff I need to do.
> So i guess we should divvy it up and get it done faster.
>
>
> thomas Aylott — design42 — subtleGradient — CrazyEgg
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list