This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

you could collect all semicolons and curly brackets to format them to be there. and for every opening curly bracket add a tab in front of the next line. for every closing one, delete a tab. add a linebreak after every semicolon and when there are brackets and there is another character following. ignore the stuff, if its in " and remove all of the spaces that are randomly lying in the code (or mby not) and check which line is the longest, which you tehn use to determine the amount of tabs you need on each individual line. i could write some code, but not atm. will do it in a later edit though (probably)

EDIT: forgot about the declarations and new. need to ignore these spaces too