how to enable auto formatting in sublime text code example
Example 1: autosave in sublime text windows 10
Windows - click Preferences > Settings - User
Add this line
{ "save_on_focus_lost": true }
Save the file
Close the file
Example 2: shortcut for auto format in sublime text 3
{"keys": ["alt+shift+f"], "command": "reindent", "args": {"single_line": false}}