<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Dec 3, 2005, at 3:38 AM, Jeroen van der Ham wrote:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Maybe we shouldn't make the universal command not too universal, because for the user it is hard to see what it really does.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Right now it has mixed behavior:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">- Without a word: begin/end environment</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">- With a word:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  </SPAN>- If that word is in the magic list:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>- If that word is in the \text* range, it creates a \text* command</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>- If that word is one of the itemize, enumerate, etc, it creates an environment.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  </SPAN>- Else, create a command from that word.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE>No, that's not exactly what it does.</DIV><DIV>- without a word, inserts begin/end environment (sidenote: Maybe add label support? )</DIV><DIV>- With a word, it first expands the word according to the shortcuts. Then:</DIV><DIV>    - If the new word is in the list of commands, it creates a command.</DIV><DIV>    - Otherwise, it creates an environment. For that environment:</DIV><DIV>        - If the TM_LATEX_LABEL variable is set to 1, it adds labels to all environments. (btw, not sure if that is ever a desirable behavior, I'm more in favor of dumping it for the custom list of extra first lines, and have that already preset for standard stuff.)</DIV><DIV>        - If not (actually, it does this even in the TM_LATEX_LABEL case), then it inserts anything stored in the firstLine hash value corresponding to the word in the line below \begin ( to support \\item and similar stuff).</DIV><DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I am sure that the universal command can be written so that it does the above, even in a smart way with labels and items, etc.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">But would the user really remember what it's for?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE>It's a good question, and maybe we should ask the list if they like it this way, and what shortcut they would want. I think they would, and after a while it would become an automatic reflex, just like Tab is an automatic reflex for snippets. All this is provided we find a good shortcut for it. For me they functionally do the same thing, they expand the current selection in an intelligent and predefined way, to the functional unit it stands for. If it's a command that I have not customized, I would be more inclined to just type out \theCommand{} rather than type theCommand and press a key combo, it does not save me enough time to make it worth it. But for the environments, then it's great. That's why i think defaulting to environment makes a lot of sense, and having a separate command for commands would personally confuse me. It would be like having a different key than tab for the tab triggers for half the commands, and tab for the other half, based on, say, whether the command calls a command-line tool or just inserts a snippet. I would just never use the command for commands.<BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It was initially created based on the html command, where almost everything is begin/end, with one or two exceptions, that are widely known.</DIV></BLOCKQUOTE><DIV>Agreed things are more clear in the html case. Though even there I would like to see it allowing me to customize for standard tags, and more generally, what attributes I want to appear in the opening tag.</DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">With Latex, you have about as much commands as environments and when the word is unknown, it is also unknown what is meant.</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>True, but if the word is unknown, it is highly unlikely that the user would want to expand is as \command{}, it only saves 2 keystrokes at most. I thing expanding as command only makes sense if you have established shortcuts, so the user would have to customize it anyway, for commands they use often. For instance I use \displaystyle all the time, so right now I have a \renewcommand at the top to have it use \ds instead. I could associate a shortcut to it, and have \displaystyle appear everywhere in the text instead. (though admittedly the command would add the braces at the end, which in this case is not desirable, so it wasn't a very good example)</DIV><DIV><FONT class="Apple-style-span" color="#0000DD"><BR class="khtml-block-placeholder"></FONT></DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">So maybe we should create two commands, one for completing commands and another for completing environments. And find some better keys for this, because ctrl-< sucks.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE>I agree with the need for a better key, but I can't think of anything. I really believe it should be a key-combo involving either tab or space, but they are both so overloaded. Maybe a combination with backtick? I am only used to a US keyboard, in which case it's right about the tab, so I don't know if this would be good for other keyboards.<BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Jeroen.</DIV></BLOCKQUOTE></DIV><BR><DIV> <DIV>Haris</DIV><DIV><BR class="khtml-block-placeholder"></DIV> </DIV><BR></BODY></HTML>