<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Dec 7, 2006, at 6:51 AM, Dirk van Oosterbosch, IR labs wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>First off: it's great that this subject comes up, for indeed: (automatic) code completion is also the TOP1 item on *my* TextMate wishlist.</DIV><DIV>But let me grab the opportunity of blatantly list some of the features I would request for such code completion. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>On 6-dec-2006, at 22:41, thomas Aylott wrote:</DIV><BLOCKQUOTE type="cite"><DIV style="">I think we should come up with a brick simple library that will let you do completions.</DIV><DIV style="">Then the hardcode d00ds can get on with extending and perfecting the completion library.</DIV><DIV style="">While everyone actually gets the chance to use it.</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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 <FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">the filename-filepath-completion-for-textmate you showed; that didn't work with a flat library file, or did it?</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>On 7-dec-2006, at 0:39, Jacob Rus wrote:</DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> I don't think it should just be alphabetical; for instance, functions already used in the current document should come sooner than others.</DIV></BLOCKQUOTE><BR><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>@Ed Singleton:</DIV><DIV>That would be great!</DIV><DIV>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.</DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Or it could be even more context aware, for instance that it also takes into account in which code block you are working.</DIV><DIV>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.</DIV></BLOCKQUOTE><BR><BLOCKQUOTE type="cite"><DIV>…</DIV></BLOCKQUOTE><BR><BLOCKQUOTE type="cite"><FONT class="Apple-style-span" color="#000000"></FONT>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.<DIV>Best,</DIV><DIV>dirk</DIV></BLOCKQUOTE></DIV><BR><DIV>This is just the time for idealism!</DIV><DIV>Please continue being idealistic. All of us need to consider the absolute best way to make this work.</DIV><DIV>No sense being pragmatic about something nobody wants</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I totally agree that contextually aware smart code completion is my goal.</DIV><DIV>But, we have to start somewhere ;)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think the focus for a 1.0 version of codecompletion would be to work with a static list of completions</DIV><DIV>But make that completer thing extendable to support dynamic contextual lists and whatnot.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>A few languages will be easier to scan than others.</DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I figure the crazy python people will want to make the python importer themselves.</DIV><DIV>I'm planning on doing Ruby and Rails and HTML and Javascript and Javascript Prototype and maybe CSS, unless someone beats me to it ;)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Next up… the breakdown of the specific tasks</DIV></BODY></HTML>