Matlab 文件格式化/Matlab Source File Formattor

由于需要使用到别人编写的Matlab代码文件,但是呢不同的人有不同的风格,有的写得就比较糟糕了。

为了更好地理解代码的内容,一个比较美观的代码会让人身心愉悦。

但是在网上并没有找到一个比较好的实现,此前到是找到一个使用Matlab的M文件来实现代码格式化的,设置还挺多的,但是我就是不喜欢(I'm Geek)。

因此,用C++和正则写了一个简单的代码格式化小工具,MFormator。已经开源到Github上了。

欢迎指教。


I do quite a lot of works with Matlab. And chances are that, I shall read some others' code. It's a pity that not all the guys write code in a neat way. At the same time, it's easier for comprehension if the code is neatly presented. So it's of great importance to format the code.

I've searched through the Internet, but is disappointed by the fact that there aren't many tools to achieve this goal. The only one I found is written in M-file. I'm a geek, and also a vim user.

So I wrote a little command line tool named MFormator which is written in C++ with regex expression. And you can find it on the github.

Please tell me if this tool help you Troy_Daniel@163.com.

posted @ 2019-11-19 23:27  Troy_Daniel  阅读(310)  评论(0编辑  收藏  举报