Section color no longer an option in 2021b?

179 views (last 30 days)
Cory Dinkle
Cory Dinkle on 19 Oct 2021
Edited: Simeon Yurek on 21 Jan 2022 at 16:41
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?
Simeon Yurek
Simeon Yurek on 21 Jan 2022 at 16:38
Is it possible to turn off the section highlight/blue line feature in 2021b while still keeping section breaks? Thanks!

Sign in to comment.

Accepted Answer

Arthi Sathyamurthi
Arthi Sathyamurthi on 26 Oct 2021
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).
Paul Hoffrichter
Paul Hoffrichter on 12 Jan 2022 at 22:27
I agree with @Cory Dinkle
I also do not like losing a 1/4 inch (6.35 mm) of vertical real estate. Remove the blue bar and just bring back the coloring.
Did one user complain about the coloring to cause MathWorks to invest in this idea?
Did MathWorks submit this prototype to their users and got a strong "Yes, this is great!" ??

Sign in to comment.

More Answers (2)

Marcel on 10 Nov 2021
@Arthi Sathyamurthi why does the Blue bar on the left side sometimes not appear?
It seems that the section bar is not available, if a .m file is a function instead of a script?
Personally I agree with @Cory Dinkle, that "improved appearance" is very subjetive and I feel a big downside on the new layout...
Paul Hoffrichter
Paul Hoffrichter on 12 Jan 2022 at 22:23
I have a short script and get a blue bar. It calls a function in a separate file. This function has many sections in it. But there is no blue bar (and no coloring as in previous versions). This file also has a number of other functions (not nested), and no blue bars in them either.
What do I have to do to get a blue bar? The blue bar is better than nothing. (But please bring back the color - even if I have a vertical blue bar, I do not want to use it because I value screen real estate highly, and need every 1/4 inch.
Update: I created a new file with a function, and added sections and got a blue bar.
How do I get my existing files to show blue bar?
Why not remove the blue bar and just leave in the coloring and save the vertical real estate?

Sign in to comment.

Marcel on 20 Jan 2022 at 7:06
I was checking out the 2022a pre-release, and found that there is still no option to highlight the current code section. Can you please address this user request before launching the official 2022a.
  1 Comment
David Rosenbaum
David Rosenbaum on 20 Jan 2022 at 11:40
Much appreciated, folks. That will help and I (we) appreciate your responsiveness ... Two more suggestions for MATLAB: (1) Provide a feature whereby all the section headers (distinguishing strings after %%) are shown as a kind of table of contents in the program and not just in the Publish version; (2) Allow for subsections down to some arbitrary number of levels as in standard hierarchicies.

Sign in to comment.




Community Treasure Hunt

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

Start Hunting!