# [OS X TeX] smart-Typing-Pairs with texshop

Alain Matthes alain.matthes at mac.com
Sun Dec 6 09:56:45 EST 2009

Le 6 déc. 2009 à 13:58, Herbert Schulz a écrit :

>
> The difference between the two methods is that using method one, modification of the ~/Library/TeXShop/Keyboard/autocompletion.plist file, actually binds the sequence to the keystroke so you (almost---see the rest of this description) always get the expansion. This can be very handy for things like {->{}, _->_{}, ^->^{} (with the selection and insertion point between the braces) because when you want the alternative meaning (e.g., a printed' {) you need to escape it (e.g., \{) and TeXShop is smart enough NOT to complete the pair if the { is escaped. I'm not sure if this is desirable for items you don't usually escape.
>
> The second method allows you complete control over when the expansion occurs by assigning a keyboard shortcut to the macro. The keyboard shortcut must contain the Command key and shouldn't conflict with other shortcuts in the menu system. I tend to use combinations like Ctl-Cmd-... but there may be conflicts anyway; the worst thing that happens is that the binding doesn't work and you have to change it. I tend to use this expansion for things like \emph{} (with the selection and insertion point between the braces) and bound that to Cmd-I (available in the latest versions of TeXShop since it has been removed from another binding).
>
> Which method you use is up to you.

`