Sublime Forum

Is there an autoformat function for Java?

#1

Hello,

I cannot seem to find a way to autoformat Java code (specifically, cleaning up indentation). Is there a package I can install to achieve this?

Thank you.

0 Likes

#2

The Edit->Line->Reindent works for me.

Alternatively, if you’re using vi mode, you can just do ggVG= to reformat the entire file.

0 Likes

#3

Thanks!

0 Likes

#4

@Watabou
I have tried Reindent but it didn’t work for me. I am using sublime 3.1.1.
I have unintended java file. complete class is written in one line. I tried to reintend it remain same

0 Likes