Color coding commented statements and comments following a statement

70 ビュー (過去 30 日間)
PChoppala
PChoppala 2015 年 11 月 18 日
回答済み: mohand alzuhiri 2022 年 10 月 25 日
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 件のコメント
olshie
olshie 2022 年 2 月 28 日
It would be great to differentiate comment colors with flags: for example
%todo: do this later
would appear in a different color.
Gionata Quadri
Gionata Quadri 2022 年 5 月 13 日
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.

サインインしてコメントする。

回答 (5 件)

Michal Demjan
Michal Demjan 2019 年 8 月 21 日
Also interested!
Maybe just implement different commenting function starting with '%!' or something..

mbvoyager
mbvoyager 2018 年 8 月 24 日
I'm also interested in this feature!

Francesco Guaresi
Francesco Guaresi 2018 年 12 月 4 日
Hi guys! I'm interested too!!

Eli
Eli 2022 年 7 月 7 日
I would also like more customizability for organizing code (like changing colors of comments)!

mohand alzuhiri
mohand alzuhiri 2022 年 10 月 25 日
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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by