[OS X TeX] Customize brackets/braces/parens/delimiters TexShop matching

Herbert Schulz herbs at wideopenwest.com
Mon Feb 12 08:10:25 EST 2018


> On Feb 12, 2018, at 2:02 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
> 
>> On Feb 12, 2018, at 1:44 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>> 
>>> On Feb 11, 2018, at 6:30 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>> 
>>>> On Feb 11, 2018, at 5:01 PM, Juan Acevedo <juan.acevedo at gmx.net> wrote:
>>>> 
>>>> Using the "British” keyboard layout, 
>>>> guillemets are 
>>>> Opt + \ 
>>>> and Shift + Opt + \
>>>> 
>>>> double quotes are 
>>>> Opt + [ 
>>>> and Shift + Opt + [
>>>> 
>>>> But mind you, I have a bit of a mixed up keyboard setup here, so better to check with your Keyboard Viewer first!
>>>> 
>>>>> Howdy,
>>>>> 
>>>>> How do you enter the opening guillemet? Is it a single keystroke (possibly along with Opt, shift, etc?) or is it a multi-stroke entry? Same with the opening double quote. 
>>>>> 
>>>>> Good Luck,
>>>>> Herb Schulz
>>> 
>>> Howdy,
>>> 
>>> That's the same as on the US keyboard.
>>> 
>>> What I'm going to tell you do is NOT what you originally asked for, a match of delimiters, but it will always give you a matching closing delimiter (» or ”) when you enter an opening delimiter (« or “). Open the Key Bindings File for Editing: Click Source->Key Bindings->Open Key Bindings File… In the first box enter « and in the second box enter «#SELE#INS#» and then Click on the + button. Do the same for “ and “#SEL##INS#” and the + button. You can then Click the Save button. From then on when you press « you will automatically get «...» where ... is any selected text followed by the insertion point. You get a similar thing when you enter “.
>>> 
>>> Hope that works for you.
>>> 
>>> Good Luck,
>>> 
>>> Herb Schulz
>>> (herbs at wideopenwest dot com)
>>> 
>>> 
>> 
>> Howdy,
>> 
>> TYPO! That should have been «#SEL#INS#», not «#SELE#INS#» (with the extra E) for the first binding.
>> 
>> Good Luck,
>> 
>> Herb Schulz
>> (herbs at wideopenwest dot com)
> 
> Howdy,
> 
> Now this is getting rediculaous. TYPO again: it should be «#SEL##INS#» with two # in the middle.
> 
> Good Luck,
> 
> Herb Schulz
> (herbs at wideopenwest dot com)

Howdy,

I really shouldn't answer any emails at that time of day (and probably at other times too). Here is that message with the correction:

What I'm going to tell you do is NOT what you originally asked for, a match of delimiters, but it will always give you a matching closing delimiter (» or ”) when you enter an opening delimiter (« or “). Open the Key Bindings File for Editing: Click Source->Key Bindings->Open Key Bindings File… In the first box enter « and in the second box enter «#SEL##INS#» and then Click on the + button. Do the same for “ and “#SEL##INS#” and the + button. You can then Click the Save button. From then on when you press « you will automatically get «...» where ... is any selected text followed by the insertion point. You get a similar thing when you enter “.

I think everything is correct there. Key Bindings will substitute any selected text for #SEL# and place the insertion point (place where text is entered) at #INS#.

The only think you have to get used to is remembering to jump over the closing delimiter when you've finished entering the text.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)





More information about the MacOSX-TeX mailing list