Reputation: 6213
Intellij Seems to have a default layout like this
def foo(int arg) {
label1:
for (i in 1..10) {
label2:
foo(i)
}
}
How do i change it to
def foo(int arg) {
label1:
for (i in 1..10) {
label2:
foo(i)
}
}
This is required since we want out test layouts to look like this:
def 'my test'() {
given:
...
when:
...
then:
...
}
ANSWER: As given below in the answer, I can confirm this works in intellij 13
Upvotes: 16
Views: 4297
Reputation: 31597
In Idea Intellij 13+
Settings -> Editor -> Code Style -> Groovy -> Tabs and Indents
Label indent: 4
Label indent style: Indent statement after label
Upvotes: 38