Is it possible to stop Intellij from eating all my extra spaces?
I've been rootin' through the settings trying to figure out if this is possible without needing to ask. But i've found nothing.
I like my code to be vertically aligned. it makes it easier for me to read, to heck with standard spacing. Like this:
public static void Foo (Object obArg, int intArg ) {...}
private static String Fee (Object obArg, int intArg, int thirdArg) {...}
public static <T> int Fumpt (Object obArg, int intArg ) {...}or, to the point of what got me to make the post.
switch (intArg) {
case 0 : return foo ;
case 1 : return fee ;
case 2 : return fumpt ;
case 132: return potats ;
default : return kyle ;
} It's neat and vertically aligned and I love it like this. But IntelliJ keeps eating my extra alignment spaces, lika so:
public static void Foo(Object obArg, int intArg) {...}
private static String Fee(Object obArg, int intArg, int thirdArg) {...}
public static <T> int Fumpt(Object obArg, int intArg) {...}switch (intArg) {
case 0: return foo;
case 1: return fee;
case 2: return fumpt;
case 132: return potats;
default: return kyle;
} Which admitedly doesn't look too bad is simplified examples, but it really does decrease the code's readability for me in my actual project, and spending multiple minutes fixing it only to have it be wrong again the next time I accidentally delete the closing class brace is starting to grate on me.
Is there a way to sate IntelliJ's ravanous hunger for white space characters so I can have my nice vertically aligned code be left undisturbed by the autoformat?
Please sign in to leave a comment.
It is not supported so far.
Please vote for this issue https://youtrack.jetbrains.com/issue/IDEA-349855/Additional-options-for-the-Java-code-formatter-to-just-keep-spaces-within-lines-for-column-oriented-styling.