Does Matlab have the function to format script?

615 views (last 30 days)
zzzhhh
zzzhhh on 10 Jun 2016
Answered: Image Analyst on 8 Jan 2022
Just wondering if Matlab has the function to format script, e.g., automatically add a space after a comma, or add spaces before and after an "=" when I press semicolon at the end of a statement, or select a block of script to be formatted and press some button. Thanks.

Accepted Answer

Walter Roberson
Walter Roberson on 11 Jun 2016
No, MATLAB does not have that. Fortunately, David Varga recently mentioned releasing a beautifier; see https://github.com/davidvarga/MBeautifier

More Answers (3)

Azzi Abdelmalek
Azzi Abdelmalek on 10 Jun 2016
Select your code, then right click with your mouse, you will see all possibilities you have. For example (ctrl+i) which is smart indent
  2 Comments

Sign in to comment.


Image Analyst
Image Analyst on 8 Jan 2022
Type
control-a, to select all text in your editor window, then
control-i, to fix (properly align) the indenting of your lines of code.

Florian Schanda
Florian Schanda on 13 Apr 2021
Edited: Walter Roberson on 13 Apr 2021
You might want to have a look at https://github.com/florianschanda/miss_hit

Community Treasure Hunt

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

Start Hunting!

Translated by