Arduino Forum

Development => Suggestions for the Arduino Project => Topic started by: Beavis4ever on Apr 24, 2019, 01:07 am

Title: disable parentheses box [SOLVED]
Post by: Beavis4ever on Apr 24, 2019, 01:07 am
hope.I(this) = validProgrammingQuestion  //This may not be valid syntax, but,
//                                                                               intent(my) = ameliorate.potentially(ruffled feathers)


{
Is there a way to disable the little blue  rectangle that  appears around a parenthesis when the cursor is near/on its counterpart?
}

/*
And if I may tack on another quick question (am unsure of how this is received around here: welcomed, tolerated,  discouraged, frowned upon,  despised,  forbidden):  what is "code folding"? I have toggled its check box in preferences, but I haven't noticed any difference.
*/



EDIT:  To solve this question, I used the library referenced in post #4, and the strategy given in post #7
Title: Re: disable parentheses box
Post by: Thee_Captain on Apr 24, 2019, 01:39 am
Is there a way to disable the little blue  rectangle that  appears around a parenthesis when the cursor is near/on its counterpart?
I am not sure if there is a setting in preferences for this. What are the drawbacks of having this?



what is "code folding"?
Code folding allows for a +/- sign beside lines with { that allows you to collapse that block of code so that you can read your code more easily.
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 02:44 am
I just find that box appearing and disappearing to be distracting; and when it's just sitting there , (for me) it has a cluttering effect.  I'm sensitive to sensory overload (TV commercials drive me bananas when they jump up to a higher volume), and so I find clutter to be stressful (to varying degrees).  I even aggravate myself when I forget to move the cursor out of the way after clicking the spot where I want to start typing. I can see how this might seem odd to "normal" people! [this text denotes 'grin']

Thanks for the explanation of "code folding". I'm not surprised that I overlooked something obvious! I will try to get this feature going to see how I like it.
Title: Re: disable parentheses box
Post by: dougp on Apr 24, 2019, 04:23 am
what is "code folding"? I have toggled its check box in preferences, but I haven't noticed any difference.
*/
And you won't until you add some code that includes curly braces, {}.  The code pictured collapses to just the first line when you click the little box on the left margin.

(https://forum.arduino.cc/index.php?action=dlattach;topic=611890.0;attach=305297)

Is there a way to disable the little blue  rectangle that  appears around a parenthesis when the cursor is near/on its counterpart?
When your programs lengthen and the matching parenthesis is off-screen it will be a big help in troubleshooting - this goes hand-in-hand with formatting via ctrl T to set indents.  If you just can't stand it you can poke around in @pert's theme test (https://github.com/per1234/ThemeTest).  I believe I saw that setting in there somewhere (no guarantees).
Title: Re: disable parentheses box
Post by: pert on Apr 24, 2019, 03:43 pm
Thanks dougp. You're correct that the matching bracket highlight can be turned off by editing the Arduino theme:

Open {Arduino IDE installation folder}/lib/theme/theme.txt in a text editor

Change line 86 from:
Code: [Select]
editor.brackethighlight = true
to:
Code: [Select]
editor.brackethighlight = false

Save the file.

Restart the Arduino IDE if it's running.
Title: Re: disable parentheses box
Post by: Jiggy-Ninja on Apr 24, 2019, 04:02 pm
Even though you can turn it off, I would recommend that you don't. Highlighting matching brackets like that is a good way to find out if you've mis-bracketed something, which is very easy to do when you're using a bunch of ifs and fors all over the place. It's very helpful for debugging.
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 04:05 pm
@pert

I followed the instructions to the letter and without incident (seemingly). It did not turn out well for me. I have attached a screenshot which shows the file with the address visible in the address bar. I used Word Pad for editing, and show the line I edited. I then show your post. And finally I show the Arduino IDE that is mocking me!
Title: Re: disable parentheses box
Post by: evanmars on Apr 24, 2019, 04:11 pm
You could always change the color to match the background

editor.brackethighlight.color = #FFFFFF
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 04:12 pm
The next time I have trouble debugging, I would have gone back and restored this feature... if I had actually disabled it in the first place. However, this a theoretical situation since I couldn't disable it.
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 04:25 pm
@ evanmars

I just tried to change the color and that wouldn't work for me either. (I skipped the screenshot documenting my efforts as it seemed pointless)
Title: Re: disable parentheses box
Post by: MorganS on Apr 24, 2019, 04:29 pm
Then you are changing the wrong file. Do you have two Arduino installations on your PC?
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 04:34 pm
OK!!! Changing the color actually did work for me... once I realized that white is #FFFFFF and not #000000 ! (I always make that mistake!!) So thanks to everyone for all the help!  I'm putting this down as a win! [this text denotes 'grin']
Title: Re: disable parentheses box
Post by: evanmars on Apr 24, 2019, 07:17 pm
OK!!! Changing the color actually did work for me... once I realized that white is #FFFFFF and not #000000 ! (I always make that mistake!!) So thanks to everyone for all the help!  I'm putting this down as a win! [this text denotes 'grin']
Kinda like
You could always change the color to match the background

editor.brackethighlight.color = #FFFFFF
Title: Re: disable parentheses box
Post by: Beavis4ever on Apr 24, 2019, 08:52 pm
@evanmars

   Yes, exactly that.  My post #9 said that your approach didn't work for me. But really, I hadn't actually done it.  After I realized I'd botched it, I went back to do it right.  And so in my post #11, I was trying to say that your idea was sound and that the error was mine.
   It seemed (to me) that your post #12 was implying that I was trying to take credit for your solution, and so I wanted to make clear that it was all you.  I had, in fact, said that it would have taken me five years to think of changing the color, but was unable to post due to a rule limiting users with < 100 posts.  I did my best to interpret the subtext of your post, given that it was only two words long!
Thanks again for your help, it's such a relief not to have that friggin' rectangle dogging me whenever I get parenthetical!
BTW...  [text denotes 'grin'] = :)