Format Code

19 Nov 2010

Hello,

The format code button is great but unfortunately it formats it in a way that I have never much liked.  Would you be willing to add in custom auto formatting rules?  Your current auto format uses:

 

if (stream.readable()) {
    stream.readNext((byte*)BigBuf, 512);     // Buffer has been read, now we can put more data in it
}

Where I much prefer:

if (stream.readable())
{
   stream.readNext((byte*)BigBuf, 512);     // Buffer has been read, now we can put more data in it
}
It might seem silly but it is the way I have always formatted my code and it is much easier for me to read with my own formatting.  It's not a complaint so much as a suggestion of something that would be really nice to have.  Thank you :)

19 Nov 2010

I second you.

I also like the second way much more. If this became an option I would appriciate it a lot

 

Bon

24 Nov 2010

I think the second way would be much better to read, I've always formatted my code like this.

24 Nov 2010

Im going to ruin the consensus and state that I like the code formatting. then again I pretty much learnt to code on the mbed.

I wonder if its possible to implement a format button similar to the one in the codeblocks compiler, in which you can select which formatting standard you want.

 

10 Oct 2011

Just started using the format button, and I too like the second method.

10 Oct 2011

It is defiantly much easier to find that Inclusive miss matched brace with the second method.

Multiple choice is the best way forwards.

Also what about a visual indication, In MPLAB, you can. Automatically match brace.

Cheers

Ceri.