mikedoth
mikedoth

Reputation: 11

Sublime Text Autoformat code without node.js?

Does anyone know if there is a plugin that i'm overlooking? I've tried several plugins and nothing has worked.

Upvotes: 0

Views: 1223

Answers (2)

chrisg86
chrisg86

Reputation: 11857

I would suggest remapping the built-in shortcut of ST3 for reindenting whole blocks of code.
See this link for details: https://github.com/chrisg86/sublimetext-tips#reindent-whole-blocks-of-code

All you have to do then is select your desired block of code and hit the shortcut. Hope this helps!

Upvotes: 0

MattDMo
MattDMo

Reputation: 102862

Since you tried Sublime-HTMLPrettify I assume you're trying to reindent HTML. The only plugin I could find on Package Control that didn't seem to require Node is HTMLBeautify. For some reason it's listed as ST2-compatible only, but a (very) quick scan of the code didn't reveal anything that wouldn't work with Python 3, so you should be able to install it manually and get it to work. Unfortunately it only indents using tabs, but a little bit of hacking on the code could easily change that to spaces if you wanted to.

Good luck!

Upvotes: 1

Related Questions