Answer the question
In order to leave comments, you need to log in
How to auto-tab unformatted code?
You need to auto-tabulate the code. The code is written in a line and is very long, so it is difficult to navigate in it.
The options that I tried:
1) sublime text - Edit -> Line -> Reindent
2) Preferences -> Key Bindings - User
If the file is empty, then paste the code completely.
If not, then add the object to the array, as you would add it to JSON.
[
{ "keys": ["ctrl+alt+l"], "command": "reindent", "args": { "single_line": false } }
]
This code allows you to format the code in the entire file or only within the selected fragment by pressing the CTRL + ALT + L combination.
Answer the question
In order to leave comments, you need to log in
It's not entirely clear what kind of code we are talking about, but try using the CodeFormatter plugin - it supports different languages. In general, there is a formatter for almost any language - packagecontrol search - format
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question