[TxMt] Re: TextMate Code Completion

thomas Aylott oblivious at subtlegradient.com
Thu Dec 7 14:30:01 UTC 2006


On Dec 7, 2006, at 6:51 AM, Dirk van Oosterbosch, IR labs wrote:

> First off: it's great that this subject comes up, for indeed:  
> (automatic) code completion is also the TOP1 item on *my* TextMate  
> wishlist.
> But let me grab the opportunity of blatantly list some of the  
> features I would request for such code completion.
>
> On 6-dec-2006, at 22:41, thomas Aylott wrote:
>> I think we should come up with a brick simple library that will  
>> let you do completions.
>> Then the hardcode d00ds can get on with extending and perfecting  
>> the completion library.
>> While everyone actually gets the chance to use it.
>
> I'm not sure if I got you right, thomas. I think that a flat  
> (Library) file is the not the solution swe're looking for here – 
> other than just a temporary one too keep the svn manageable ;)–. I  
> think the system for our code completion should be much more  
> complex and *context-aware* than that. Like the filename-filepath- 
> completion-for-textmate you showed; that didn't work with a flat  
> library file, or did it?
>
>
> On 7-dec-2006, at 0:39, Jacob Rus wrote:
>>  I don't think it should just be alphabetical; for instance,  
>> functions already used in the current document should come sooner  
>> than others.
>
> Indeed, or even better: that it has the learning behavior –like  
> the ⎋ completion in TextMate already has now– : frequently (or  
> previously) used completions will show up first.
>
> @Ed Singleton:
> That would be great!
> I think python would be a good case to start building such a smart  
> system, because of its extensive introspection. Take a look at  
> ipython (the alternative interactive python interpreter), if you  
> haven't already.
> Good code completion systems would strongly work with the context  
> in which the completion is requested. And luckily for us TextMate  
> already has a great scope (context) system. For code completions  
> that would imply that only the functions, methods or properties  
> show up that object or context is susceptible to.
>
> Or it could be even more context aware, for instance that it also  
> takes into account in which code block you are working.
> E.g. (seen in Xcode) Inside the method doSomethingWithFoo: of class  
> Bar, we call a totally different class Baz, which happen to have  
> the same method doSomethingWithFoo. Then before you type anything  
> more than `[Baz ` it already show doSomethingWithFoo as the first  
> completion.

>
> I recognize that most of these features will not be simple to  
> implement, but please forgive me for being an idealist instead of a  
> pragmatist.
> Best,
> dirk

This is just the time for idealism!
Please continue being idealistic. All of us need to consider the  
absolute best way to make this work.
No sense being pragmatic about something nobody wants

I totally agree that contextually aware smart code completion is my  
goal.
But, we have to start somewhere ;)

I think the focus for a 1.0 version of codecompletion would be to  
work with a static list of completions
But make that completer thing extendable to support dynamic  
contextual lists and whatnot.

A few languages will be easier to scan than others.
Rails is my main goal here, and for that I think opening up a rails  
console in the background with a customized DRB connection will allow  
very quick response time to everything that the Rails console can  
give you.

I figure the crazy python people will want to make the python  
importer themselves.
I'm planning on doing Ruby and Rails and HTML and Javascript and  
Javascript Prototype and maybe CSS, unless someone beats me to it ;)

Next up… the breakdown of the specific tasks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061207/f2c8120e/attachment.html>


More information about the textmate mailing list