[OS X TeX] Still trying to understand autocompletion
Herbert Schulz
herbs at wideopenwest.com
Sun Jul 11 12:03:00 EDT 2010
On Jul 11, 2010, at 10:41 AM, Herbert Schulz wrote:
>
> On Jul 11, 2010, at 10:17 AM, Alan Munn wrote:
>
>> Hi again. Thanks to Herb and Dick for fixing the autocompletion bug. I hope I haven't found another one, and the following is just me not understanding how it's supposed to work:
>>
>> If I type:
>>
>> \begin{ite
>> and hit Tab or Esc
>>
>> I get the following:
>>
>> \begin{itemize}
>> \item
>> •
>> \end{itemize}•
>>
>> Surely that linebreak shouldn't be there? Can I get rid of it? And what's the • after the \end{itemize} doing there?
>>
>> Alan
>>
>> (On a separate note, auto completion messes with a great parenthesis balancer (AutoPairs) that I use, but I doubt this is a fixable problem, and I'll have to decide which is more useful to me in practice.)
>>
>> --
>> Alan Munn
>
> Howdy,
>
> By ``linebreak'' do you mean between the \item and the following • for the text? It's the way I like it! :-) It can also be easily changed. Open the CommandCompletion.txt file (Source->Completion->Open Completion File…) and find the (multiple) itemize (and item) entries and remove the #RET# between the \item and the •. The reason there are multiple entries is that you there are multiple ways to bring up; and you've chosen one of the more difficult :-).
>
> Rather than using completions use abbreviations. To get the itemize environment above simply put
>
> bit
>
> or \bit (the b starts all abbreviations for environments, e.g., benu for an enumerate environment) and trigger the Command Completion. If you have the latest CommandCompletion.txt file there should be documentation, which contains tables of all the abbreviations, in ~/Library/TeXShop/CommandCompletion/; if it isn't there you aren't using the latest CommandCompletion.txt file---move the ~/Library/TeXShop/CommandCompletion/ folder to your Desktop and restart TeXShop. You need only type part of an abbreviation; then pressing the trigger multiple times will cycle through all the matches.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)
>
Howdy,
I just realized I missed a point. I put the extra • at the end of the \end{itemize} (and other environments and commands that will require more than one arrow key press to exit) so you have a quick way to get to the end of the environment using the Next Mark command. As with the #RET# you can always remove it if you don't like it.
More Information:
As far as abbreviations are concerned try
ssec
(or \ssec) and then trigger to get the \subsection{•} command (with the • selected so it will be replaced by whatever you type) while a second press of the trigger (I assume you know I mean the Esc or Tab key depending upon you choice in TeXShop->Preferences->Source->Command Completion Triggered By:) will give \subsection[•]{•} with the first • selected.
You can also see some helpful hints with the latest CommandCompletion.txt file by typing
bwr
(or \bwr) on a new line and then trigger multiple times and you'll see the hints for a command that has multiple variations till you cycle around to the original abbreviation.
One very important point: you need only learn abbreviations as you need them (probably the most used are the itemize and enumerate lists and sectioning commands) rather than everything on the rather intimidating lists in the documentation.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list