Clear Filters
Clear Filters

Section color no longer an option in 2021b?

182 views (last 30 days)
Prior to the changeover (versions 2021a and older), the current section in the Editor would be highlighted a yellowish color. Now with 2021b, there is a blue bar on the left to indicate the current section. I'd like the yellow-highlighted color back. Looking at the forum, there was an option in Preferences -> Colors -> Programming Tools that would allow the user to customize this section color, but unfortunately this has been removed. Or am I not seeing it somewhere?
  29 Comments
shengzhi
shengzhi on 19 Jul 2024 at 3:29
Moved: Walter Roberson on 19 Jul 2024 at 3:44
R2024a still no section highlight
Brian Keane
Brian Keane on 19 Jul 2024 at 14:17
I ask that you please bring back the section highlight from 2021a. As a person who professionally studies visual perception, I can say that color-coded sectioning provides a powerful and intuitive way to discern where you are in the script, and where one section ends and the other begins. At the very least, it should be offered as an option that can be toggled on or off.

Sign in to comment.

Accepted Answer

Arthi Sathyamurthi
Arthi Sathyamurthi on 26 Oct 2021
Hi,
Starting in R2021b, sections in the Editor have an improve appearance. The new section is highlighted with a blue border, indicating that it is selected. Hence, "section display option" to highlight section is not available in R2021b.
For more information refer to R2021b Release Notes (Environment --> Editor Sections).
  52 Comments
ANGELICA LIPONI
ANGELICA LIPONI on 4 Jan 2024
Edited: ANGELICA LIPONI on 4 Jan 2024
Hi, I agree with the sentiments expressed in the comments above (if not all, then certainly the vast majority). Having the ability to highlight the current section in the Editor by using a different background color would be greatly appreciated. It truly aids in visualizing the start and end of a section, which I find extremely helpful. I hope this option could be reinstated in the upcoming releases.
Additionally, as someone else has already pointed out (here), it's currently challenging to discern the starting point of the text within a line due to the presence of a left margin. Consequently, it's unclear if there's any indentation present. Thank you!
Ivan Kirschner
Ivan Kirschner on 26 Feb 2024
Moved: Walter Roberson on 19 Jul 2024 at 3:42
I vastly prefer the old yellow section highlighting for functions, scripts, or any other form. It does not take up any space at all. Like Bob, I strictly use functions for programming in MATLAB, but I like the narrow line numbering width. PLEASE bring back the yellow section highlighting!!!!!!

Sign in to comment.

More Answers (2)

Paul Hoffrichter
Paul Hoffrichter on 21 Oct 2022
Edited: Paul Hoffrichter on 21 Oct 2022
When I called MathWorks about coloring of the call stack lines (above the current function) when stepping through the r2021b debugger, the agent checked and saw another similar complaint. They fixed this problem in r2022a but did not fix it for r2021b.
If they get many complaints on the technical support line, maybe they will add the yellow color section background. So call!
Technical Support: 508-647-7000 Access to technical support requires a valid license number and a Software Maintenance Service subscription.
Enter ver to get the license number.
Not sure how this works for students. However, they are acutely aware that students become their future customers, so call and find out how to complain about their bad feature.
When calling be very specific about this one missing yellow background issue. Don't combine multiple issues in one call.

Alan Peters
Alan Peters on 3 Oct 2022
The blue line thing is not only a worse indicator of the current selection but it is also, to put it nicely, an annoyance. If I accidently click on it the section runs. That is actually more than an annoyance because it completely disrupts my flow. That makes me angry in a time when I do not need one more source of anger. Some people may like the new live blue line. But I most decidedly do not. Please make it an option so I can get rid of it!
  2 Comments
Amy
Amy on 26 Oct 2022
Alan, if you right click in any part of the left margin, you can unselect "Show Run Section Margin". This preference will take effect in all open editors and in all future MATLAB sessions and is available in R2021b and later releases. This is documented on the page Create and Run Sections in Code.
Alan Peters
Alan Peters on 26 Oct 2022
Thank you very much, Amy! That does solve my problem -- accidently clicking on the blue line causes the whole script to run when I did not want it to and thereby dissrupted my work flow. Now I'm back to where I was and that is good.
I do wonder why, when introducing a GUI element that supplants a current one, the current one is not kept as an option. I understand that it some cases that is not possible. But having either a blue line next to, or a yellow highlight over the current section seems rather a trivial option to implement. I have been using matlab for 35 years(! Time flies.) first on Sun Workstations, later on windoze PCs. The changes in the program over that time have been dramatic, amazing, and largely very welcome. One that threw me was when the keyboard shortcuts changed from the unix/vi set to a windows set. But I soon found that the previous set still worked, it just had to be installed. No problem at all! I still install those with every new release and continue on. So Mathworks knows how to provide alternatives. I am surprised that the yellow highlight was not retained as an option. Perhaps an unintended oversight?

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!