This is the little sleep in just found a sublimetext in the format of the code, in fact, the format of the code is the function of the sublimetext itself, but has not been a small awareness excavation.
Before the small sleep for the format of the code are copied code, and then pasted into the Webmaster tools to format the code, but in the small sleep test the following sublimetext with the format of the code features, Xiao that this is a redundant step.
So, speaking of which, what should be done with Sublimetext's own formatted code function?
This feature is named Reindent by Sublimetext, and if you use the Sublimetext package, it's called "Indent again," but that doesn't make sense.
Path to this option: edit-line-reindent (Chinese path is: edit-line-indent again)
At the same time, this feature does not need to select the code to perform the formatting function, which by default is the format of the entire file code.
Next to the topic, how should the format of the code function to set the shortcut key combination?
1, first through the following path to open the user key binding file:
Preferences→key Bindings–user
2, and then add the following code (if you need it, the shortcut key combination can be defined by itself):
{"Keys": ["Ctrl+shift+r"], "command": "Reindent", "args": {"Single_line": false}}
Here, please note that each set of shortcut key combinations contains an inside bracket, defines a set of shortcuts through curly braces, and separates them by commas, which can be referenced in the following illustration:
Is this the end of the article here? No, Next, if Sublimetext's formatted code doesn't fit in the language you're using (such as SQL, Ruby, etc.), you can configure it in a plug-in way, see the following:
1, the following content based on already you have installed in your Sublimetext package control (tutorials in this site have);
2, through the shortcut key combination ctrl+shift+p call out the command panel
3, in the panel input "install package" after the carriage return
4, then enter the "format" (that is, formatted meaning), in the pop-up list to find the corresponding you want to format the operation of the language, specifically look at the picture:
The above content is a small series to introduce the Sublimetext with the format of the function of the reindent of all the narration, I hope you like.