reindent shortcut in sublime text

Yaron Naveh picture Yaron Naveh · Aug 29, 2012 · Viewed 79.8k times · Source

Possible Duplicate:
Indenting code in Sublime text 2?

I'm trying to learn keyboard shortcuts in Sublime. What is the keyboard shortcut in Sublime Text 2 for reindent? According to some pages it should be TAB but that only indents, not reindents.

Answer

Kummo picture Kummo · Oct 23, 2012

You can find it in Edit>>Line>>Reindent, but it does not have a shortcut by default. You can add a shortcut by going to the menu Preferences - Keybindings-User, then add there (the config file takes as a JSON format):

[
    { "keys": ["f12"], "command": "reindent"} 
]

(example of using the F12 key for that functionality)