Skip to content

Groovy Reindent issue #654

@tet-driver

Description

@tet-driver

Copying an issue addressed here:
https://forum.sublimetext.com/t/st3-groovy-reindent-issue/21608

hi All,

I am new in sublime text 3 and I ran into this re-indent issue in groovy coding.

def flag = false;

if (flag) {
    println "good";
} else {
   println "bad";
}

if I highlight the whole section, and perform a re-indent, it result will be:

boolean flag = false;

if (flag) {
    println "good";
    } else {
     println "bad";
 }

However, if the "else" is on its own line, then it seems to work perfect. I do want to have the else in the same line as the close curly bracket of the if.

Anyway I can re-configure this to make it works that way I prefer? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions