system
March 20, 2012, 9:47am
1
Hi,
I noticed this behaviour in older releases and in IDE 1.0 as well. If you copy and paste this code to IDE,
int myVar[ 1 ][ 1 ] =
{
{ 0 }
};
and pres Ctrl + T (Tools - Auto Format) couple of times, you will get this:
int myVar[ 1 ][ 1 ] =
{
{
0 }
};
Each time you use Auto Format
closing curly bracket in var1 moves to right,
new line adds to end of file.
Can someone confirm this behaviour, please? Any workaround so far? (Auto Format for one-dimensional array works fine)
Thanks
qwertysimo
"feature" confirmed
workaround: type it directly in a good layout so you don't need the autoformatter (be the autoformatter yourself
You can write a new autoformatter sketch, upload it to the arduino and then throw in its own source ....
system
March 21, 2012, 8:41am
3
You know, it is no problem to keep nice layout manually but sometimes, e.g. after some copy & paste operations when you move a nested code block one level higher, it is much quicker and less prone to errors to use autoformat than edit many lines by hand...
Thanks.
You are absolutely right,
I use Notepad++ often and it also has an autoformat (C++ re-indent)
int myVar[ 1 ][ 1 ] =
{
{ 0 }
};
int myVar[ 1 ][ 1 ] =
{
{
0 }
};
It expanded the tab on the original, but did not improve the faulty one
You might wanna try - Artistic Style - it has zillion++ options