How can I change the behavior of the commenting function so that the location of the % respect the indentation?
Show older comments
When I comment the line 5 using ctrl+R> or clicking on the "comment" icon:

I get:

I would like to have instead:

How to achieve that?
Answers (1)
Mischa Kim
on 3 Feb 2014
0 votes
Franck, probably the easiest way is to use smart indenting: select all text (CTRL + a) and then use CTRL + i.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!