Ideas
Follow


Jérôme

Highlighting structure fields in MATLAB editor

Jérôme on 26 Apr 2024
Latest activity Reply by Jérôme on 29 Apr 2024

In the MATLAB editor, when clicking on a variable name, all the other instances of the variable name will be highlighted.
But this does not work for structure fields, which is a pity. Such feature would be quite often useful for me.
I show an illustration below, and compare it with Visual Studio Code that does it. ;-)
I am using MATLAB R2023a, sorry if it has been added to newer versions, but I didn't see it in the release notes.
goc3
goc3 on 27 Apr 2024
There are so many things that get changed, added, improved, etc. for each release that they tend to not always include them all in writing. This is a shame, as there are many very useful features in MATLAB that are often not easy to find.
As far as the highlighting of structure fields is concerned, I can confirm that this DOES WORK in R2024a, even for second-level fields.
Context highlighting seems to be something that they are gradually improving from release to release instead of all at once. For example, in R2023b, the highlighting of structure fields does work, although this does NOT include within the arguments block. Highlighting of structure fields within the arguments block DOES WORK in R2024a.
A related pet pieve is that class properties are not similarly highlighted within a class file, up through R2023b. Fortunately, this has been made to work in R2024a.
Jérôme
Jérôme on 29 Apr 2024
Thank you for the information, that's great!

See Also

Tags

No tags entered yet.