Color coding commented statements and comments following a statement
36 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I would like to know if there is a possibility of having a different color for a commented statement and a comment that follows a statement, e.g.,
% u=rand
u = rand % generate a random number from U[0,1]
shows both in green but I would like to differentiate. I could not find a lead from MATLAB preferences.
9 Kommentare
olshie
am 28 Feb. 2022
It would be great to differentiate comment colors with flags: for example
%todo: do this later
would appear in a different color.
Gionata Quadri
am 13 Mai 2022
A small workaround could be to write the "comments" (e.g. todo) as a system command with the bash colon operator ':', and temporarily change their color in the settings.
s = settings;
s.matlab.colors.SystemCommandColor.TemporaryValue = [255 75 0];
!: TODO: Lorem ipsum
Unfortunately it only works on new lines.
Antworten (5)
Michal Demjan
am 21 Aug. 2019
Also interested!
Maybe just implement different commenting function starting with '%!' or something..
0 Kommentare
Eli
am 7 Jul. 2022
I would also like more customizability for organizing code (like changing colors of comments)!
0 Kommentare
mohand alzuhiri
am 25 Okt. 2022
It would be nice to have a special color for ToDo items...This feature would be useful especially when you want to share them with your team
0 Kommentare
Siehe auch
Kategorien
Mehr zu Historical Contests finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!