Dienstag, 14. August 2012

FlashDevelop: Curly braces and CodeFormatter

I have been using FlashDevelop lately. It is a great IDE for ActionScript development. But coming from an Eclipse background I had to relearn a lot of keyboard shortcuts. One feature I really like in an IDE is using a code formatter. FlashDevelop contains such a feature and it can be accessed by right clicking in the editor and selecting Refactor->Code Formatter or by using the keyboard shortcut CRTL-Shift-2.

But as always every programmer hates it when the automatic code formatter destroys lovingly crafted indentation. The default behavior of the FlashDevelop formatter is to put the curly braces on a new line. I have struggled a long time with myself over whether to put them on a new line or keep them on the same line. The later option won. And now it just feels awkward to see them on a line of their own.

Of course FlashDevelop provides a solution - a little bit hidden. Go to

Tools -> Program Settings -> CodeFormatter -> BraceStyle

and change it to "OnLine".

Keine Kommentare:

Kommentar veröffentlichen