Sublime Auto Indent

Published on: February 27, 2014

I recently discovered how to get Sublime to fix indentations for you! Since I spend a certain amount of time each day pushing characters left and right this was pretty exciting. Hope you find it useful!

In Sublime, under Preference select Key Bindings - User. If you've got anything in there already, just add the { "keys"... } section below. Otherwise you can replace the [] with:

1
2
3
4
[
  { "keys": ["super+i"],
    "command": "reindent"}
]

Now you can use cmd + i (mac), or ctrl + i (windows) to auto indent your code. It’s not always perfect, but it’s helped me with my rails code.

What’s happening here?


comments powered by Disqus