[texshop] Smart brace matching

Bruno Voisin bvoisin at icloud.com
Sat Dec 29 23:24:06 CET 2018

Two things I just noticed in TeXShop 4.21:

- Attempting to edit some package loading code, I realized TeXShop seems to be doing clever things with bracket input, taking initiatives beyond what the user actually types.

Namely, I was selecting parts of the bracketed options and "braced" package name, like that

from the opening square bracket "[" (included) to the closing curly brace  "}" (excluded).

Then I started to type an opening curly brace "{", to replace the selected text. All of a sudden opening and closing curly braces were added around the code I had selected, instead of replacing it, yielding

To be clearer, I had selected


then typed 


to replace it. Instead, I got


All in all, it seems that when you select some text, then type some opening delimiter, the selected text is surrounded by matching delimiters, not replaced by them.

Is this "smart" behavior triggered by some TeXShop option somewhere? Is there a way to prevent TeXShop from taking any initiative, from altering in any way what the user types? Is this set by TeXShop's "Editor can add brackets" option?

I'm used to input at the keyboard each and every character that is meant to appear in TeXShop's input (or any software's input for that matter), nothing less, nothing more, never relying on any form of auto-completion or "smart" input. I realize this may seem antiquated and sub-optimal, but I'm confortable that way (with the time required to type the repetitive keyboard input providing time to think about the meaningful keyboard input that will come next).

- To do the above, I was launching TeXShop with 10 macro documents say of about 150 lines each, and a small LaTeX document of about 6 pages. The documents were open the last time TeXShop was closed, meaning that when I launched TeXShop all the 10 + 1 documents had to be opened at once.

Doing that, TeXShop turns out to be totally unresponsive for about 1 minute every time it is launched. By this I mean the windows cannot be clicked, nothing happens in TeXShop for this 1 minute (really, I timed it).

This seems to correspond to the time for the 10 macro documents to be syntax-colored. Is this due to the new way syntax coloring, or spell check, works? Is there a way to prevent this from happening?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texshop/attachments/20181229/9d2ca117/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d?e?cran 2018-12-29 a? 19.18.45.png
Type: image/png
Size: 80437 bytes
Desc: not available
URL: <https://tug.org/pipermail/texshop/attachments/20181229/9d2ca117/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2018-12-29 at 19.30.57.png
Type: image/png
Size: 75751 bytes
Desc: not available
URL: <https://tug.org/pipermail/texshop/attachments/20181229/9d2ca117/attachment-0003.png>

More information about the texshop mailing list