Y
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
filip01
4734 days ago
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}}
link
blahbap
4734 days ago
Ah, lovely, thanks! Note, just replace "command" with "ctrl" for Windows
link
danielsamuels
4734 days ago
I think you can use 'super' for cross platform compatibility.
link
Raphmedia
4734 days ago
Simply open the command pallet with the shortcut and press "re" then enter. (At least, in Sublime Text 2)
link
{ "keys": ["command+shift+g"], "command": "reindent", "args": {"single_line": false}}