<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On May 15, 2007, at 6:05 PM, Allan Odgaard wrote:</DIV><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">On 14. May 2007, at 16:20, Thomas Aylott (subtleGradient) wrote:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Then we also only need one command, rather than a command per bundle (or per scope, as it seems is currently the case).</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">So advantages:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>1) only one command, not a command per bundle/scope</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>2) simpler code to read the list (no file I/O / plist parsing)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>3) not going to be a problem for the user to update completions for bundles not in ~/Library</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>4) the completions do not poison the normal </FONT><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">⎋ completion carpus</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px; font: 12.0px Lucida Grande; min-height: 15.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">Disadvantages:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 20.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande"><SPAN class="Apple-converted-space"> </SPAN>1) the completions you setup for this command are not available via ⎋</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Lucida Grande; min-height: 15.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">Yes, I agree that if we do it with the environment variable we should be able to have a single simple command.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">Then anything that requires a different list of completions can have a separate completion command or could simply inject values into that environment variable.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">CSS and Ruby both have more complex completion commands.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Lucida Grande; min-height: 15.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">HTML isn't a great example of how this should work since the completions list is really crappy.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">But CSS is a great example of how it should work. There's a single definite list of completions for each scope. The list of escape completions and menu completions should be the same.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande; min-height: 15.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">Another way to achieve getting the same list of completions also on ⎋ is by setting a completionCommand for the scope, which just returns the list from the environment (filtered to only contain items with TM_CURRENT_WORD as prefix).</FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>oh carp! why didn't I think of that?!</DIV><BR><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">I hate the thought of duplicating lists for both escape completions and menu completions. But I guess that gives us the option of having a different list for each. HTML is a good example of things you'd want in the menu but not the escape list.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande; min-height: 15.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">Yeah, I think just considering the two types of completions different is the best for now. This is also what I do most of the time when working, i.e. ⎋ is for just repeating something I did a few lines ago, where ⌥⎋ is “go hunt (in the “standard library”) for something that I don’t want to type out myself”. <BR></FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Yes! That is a great standard to go for.</DIV><DIV>Let's standardize on that concept and we'll be much better off.</DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 12.0px Lucida Grande">But I agree that there is overlap, but I think we should tackle this problem when we have 2.x out with an actual completion infrastructure, then TM could do the splicing of completion lists if requested on the various gestures used to call upon completion.</FONT></P> </BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Just be sure to have your source code hosted online somewhere with instructions on how to complete 2.0 incase aliens attack or something.</DIV><DIV><BR><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>thomas Aylott — <B>subtleGradient </B>— CrazyEgg — sixteenColors</DIV></DIV></BODY></HTML>