Code Formatter/ Beautifier?

 

Hi,

does anybody knows a code formatter/beautifier for MQ4 or MQL5?

It would be quite helpful to format the code as in any better development editor automatically...

 

Any beautifier for Java or C++ would work. Jedit for example has the AStylePlugin but there are many more and for other editors also and also plenty of command line tools.

Set it to use 3 spaces as indentation and use no tabs and your preferred bracing style (or use the one and only true style). And then when using and editing the beautified result in MetaEditor simply don't mess up the formatting anymore and keep using the same style when adding new code.


The odd 3 spaces indentation where deliberately chosen by MetaQuotes to express their strong individuality, their uniqueness and their consequent rebellion against each and every standard that has ever existed or will ever exist and to demonstrate their absolute right to repeat each and every single error others have made before them. 3 is not a common denominator of any other standard indentation and it is also a prime number which makes it even more unique, there is even some mathematical beauty in it! 5 and 7 were also discussed as possible alternatives but for some reason they finally choose 3 (probably because everybody else would have expected them to choose 7 under such premises).
 

save it to file as a .cpp file name.

then open it in some C++ language editor like Visual stdio,

then format it in there.

and save again.

oK

 
There is now a styler built in, ctrl+,