On Nov 21, 2006, at 8:15 AM, Alain Matthes wrote:
i've the same problem and i don't understand "configuration File of what" Where is in the doc ?
It is in section 5.1.1 of the LaTeX bundle help. It is the file that allows you to customize the shortcuts and behavior of the commands "Insert Command Based On Current Word" and "Insert Environment Based On Current Word".
If you look at the file, it starts of with something like this:
commands = { it = '\textit{$1} '; bf = '\textbf{$1} '; tt = '\texttt{$1} '; sf = '\textsf{$1} ';
This tells it that when you have the word "it" and your trigger the "Insert Command..." command, then \textit{$1} will be inserted. This text is treated as a snippet snippet: http://macromates.com/textmate/ manual/snippets#snippets
So say for instance that you wanted "rep" followed by triggering the command to insert "\documentclass{report}" with a newline so that you continue on the next line. You could do this by adding a line there saying:
rep = '\documentclass{report}\n';
Then save and close the file, and your new shortcut is ready!
similarly in the environments section you can do something similar. Then you have sections like these:
environments = { itemize = { triggers = ( 'it', 'item', 'itemize'); content = "\t\item $0"; }; enumerate = { triggers = ( 'en', 'enum', 'enumerate'); content = "\t\item $0"; };
The "itemize" part reads as follows:
1) The environment name is going to be itemize. So this will be inserting: \begin{itemize}...\end{itemize} 2) It will be triggerd by either "it", or "item" or "itemize". (You could for instance add 'i" as a trigger) 3) Between the lines containing the \begin{itemize} and \end {itemize}, the text indicated by "content" will be inserted, interpreted as a snippet. (If present, this should contain $0 somewhere, to indicate where you want the caret to end up).
Hope this helps a bit.
Alain
Haris