Hacker News new | ask | show | jobs
by blahbap 4734 days ago
Anyone know a way to auto-indent lines when working with HTML/Javascript? I feel the "Select text - Reindent" process is cumbersome
2 comments

Put this in your user key bindings and then you can auto-indent with cmd+shift+g:

{ "keys": ["command+shift+g"], "command": "reindent", "args": {"single_line": false}}

Ah, lovely, thanks! Note, just replace "command" with "ctrl" for Windows
I think you can use 'super' for cross platform compatibility.
Simply open the command pallet with the shortcut and press "re" then enter. (At least, in Sublime Text 2)