Sublime Forum

Format or 'beautify' code

#1

Is there an extension or command for sublime text that will allow auto formatting of code, removing white spaces, fixing indents, etc.

Something similar to the ‘pretty print’ Eclipse plugin.
A ‘code beautifier’
I’m primarily interested in

1 javascript
2 python (indents of course important!)
and
3 html5

0 Likes

#2

[quote=“eco_bach”]Is there an extension or command for sublime text that will allow auto formatting of code, removing white spaces, fixing indents, etc.

Something similar to the ‘pretty print’ Eclipse plugin.
A ‘code beautifier’
I’m primarily interested in

1 javascript
2 python (indents of course important!)
and
3 html5[/quote]

Select all text, Edit | Line | Reindent doesn’t work for you?

0 Likes

#3

This is the kind of feature that needs to be implemented on a per-language basis; look to packages for this, because Sublime isn’t an IDE and I doubt will ever supply such a feature by default.

0 Likes

#4

For HTML, you can install the “tag” package, it has a command for that

0 Likes