# How can selection of delimiter matches be disabled?

I often preemptively match delimiters. As a simple example, I'll type Import[], then left arrow, then "filename".

The problem is that when I type the ] in Import[], the [ highlights in the normal selection color to signify that this pair of brackets matches. During this automatic highlighting, if I type something that involves the shift key (such as something starting with "), the ] is deleted, leaving Import[". This behavior is as if the ] was selected when the " was typed, but it was not.

To reiterate, the sequence of keys is (quickly typed!) Import[] then Left Arrow and Shift+' but the behavior is as if the sequence were Import[] and then Shift+Left Arrow and then Shift+'.

It might be my imagination, but it seems to have gotten worse in Mathematica version 9.

Can I disable or shorten the automatic highlighting of matching delimiters? It appears to be the source of the phantom shift keystroke.

This is Mathematica version 9 on Mac OS X 10.7.5.

Wolfram support suggested unchecking "Enable dynamic highlighting" and this does not fix the problem. I recorded the problem happening twice in a row here. It happens a bit faster than it is being displayed here.

I'd settle for just shortening the duration of this highlighting so I'd have to be Superman to reproduce the problem.

-
I can reproduce the problem, but it requires some extremely quick typing! I can't actually type " fast enough, but I can type other Shift combinations. Did you report this as a bug? – Szabolcs Dec 17 '12 at 22:16
You should add your operating system, because here on Linux, I cannot reproduce it. One possible quick fix is to to type Import and then Alt+] which creates [] and positions the cursor inside the brackets. – halirutan Dec 18 '12 at 13:44
@Szabolcs, thank you for reproducing it. I contacted support today. – ArgentoSapiens Dec 18 '12 at 16:34
@halirutan, thanks for the suggestion. On the Mac this is cmd+alt+], which is not nearly as easy. Maybe I'll change the shortcut to alt+] and use this as the workaround. – ArgentoSapiens Dec 18 '12 at 16:36

The delimiter highlighting time is controlled by the option DelimiterFlashTime, which can be set for a cell or a notebook or the entire front end. You can lower the value (default 0.3 seconds) or disable it entirely with a value 0.
SetOptions[EvaluationNotebook[], DelimiterFlashTime -> 0]

Change to $FrontEndSession if you want to change it across all notebooks for the current session or use $FrontEnd if you want to change it for the entire front end from here onwards.