Reputation: 6892
I'm using the Community Edition of Intellij IDEA. I'm a little annoyed at how it restricts the way I use indentation in some areas. For example, it's hard to format the multi-line String below using tab key:
def text = """
This is a multi-line comment.
I want this indented.
And this too.
"""
I've been looking at the code style options but I can't figure out which one to configure.
Upvotes: 0
Views: 1101
Reputation: 1667
You can write your string without indentations and then use multi line edit (multi cursor) to indent all the lines you want at the same time.
More on that feature in the link below (and also a short video demo): http://blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-rc-introduces-sublime-text-style-multiple-selections/
Upvotes: 0
Reputation: 3739
I don't know of any configuration for multi line strings. I guess formatting the contents of Strings is in itself a bit dangerous. I expect auto format to change the format of my code, not the semantics of my code.
The following might ease your pain a bit if you find yourself doing custom formatting not supported by auto format:
Upvotes: 2