<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So ordering the completions is a big issue, possible of saving us hours and hours.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>As the final feature to list I also want to mention that I would be a fan of *SubWordCompletion*. (This used to be a feature of Xcode, but they removed it, unfortunately). With SubWordCompletion I mean that it can also complete on *parts* of completion terms, without leaving the completion modus, with the possibility to narrow down on the completion term fast. An example:</DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">You're looking for NSNumberFormatterRoundDown.</SPAN></FONT></DIV><DIV>Then typing `NSNum ⇥ F ⇥ R ⇥ D ⇥` should be enough to make the complete NSNumberFormatterRoundDown.</DIV><DIV>This would the breakdown of the steps in the interface:</DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">1. You type NSNum</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">It completes to NSNumber</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">2. type ⇥</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">It stays in completion mode, showing you all possible continuations of NSNumber... (Hit ⇥ ag</SPAN><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">ain or hit enter to exit completion mode and use NSNumber)</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">3. type F</SPAN></FONT></DIV><DIV>it completes to NSNumberFormatter</DIV><DIV>4. type ⇥</DIV><DIV>you see NSNumberFormatter... and still stays in completion mode</DIV><DIV>5. type R</DIV><DIV>it completes to NSNumberFormatterRound</DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">6. type ⇥</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><SPAN class="Apple-style-span" style="background-color: transparent;">you see the 9 possible endings of NSNumberFormatterRound...</SPAN></FONT></DIV><DIV>7. type D</DIV><DIV>it completes to NSNumberFormatterRoundDown</DIV><DIV>8. type ⇥</DIV><DIV>presto!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><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></BODY></HTML>