Matlab代码自动格式化

对于Python,代码自动格式化可以通过Autopep8等实现;但在Matlab中仅通过Ctrl+A和Ctrl+I不能满足需求。

目前可行方法有三:

其一,使用MBeautifier,目前我在用。

1 在matlab2016b中设置路径;

2 按照github页面上参数修改修改MBeautifier\resources\settings\MBeautyConfigurationRules.m;

3 在命令行窗口中键入MBeautify.formatCurrentEditorPage(true)。

其二,使用在线版Online Editorhilite.me等。

其三,在Visual Studio Code中使用matlab-formatter

原文地址:https://www.misaraty.com/251

猜你喜欢

转载自blog.csdn.net/qq_26565435/article/details/109028360