fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
817 stars 219 forks source link

Haxe auto-indentation issue on case expression #971

Open Simn opened 8 years ago

Simn commented 8 years ago

This google code issue is still an issue.

https://gist.github.com/Simn/0dd44372e5b5cb699cac

Put the cursor at the end of line 7 and press enter. FD decreases indentation of the case expression.

I tried changing several settings, the only one that seems to affect it is disabling Smart Indent Type (which isn't really an option unless you get paid per keystroke).

FD 5.0.0.2

This behavior can be very annoying when working with nested switches.

YellowAfterlife commented 8 years ago

I have been writing my switches as

switch (value) {
    case 1: {
        //
    };
    case 2: {
        //
    };
}

for a while now, I suppose that in part due to this issue too. It seems like you can only go certain length in terms of code complexity with switches before the fight with auto-indentation begins.

elsassph commented 8 years ago

Scintilla auto indentation is a bit aggressive and difficult to control - we should tune it down, or disable it.

Simn commented 8 years ago

I don't know if it makes a difference, but I think this should be labeled bug, not enhancement.