I don't remember exactly when this functionality stopped working, but I always had Sublime Text do auto indenting properly. For example, if I type <div>
and then press Enter , the caret would automatically make a tab on the next line. Similarly, when I closed tags, they would automatically un-indent by one tab (such as when pressing alt + . in order to close a tag).
This functionality seems to have disappeared, at least in ST3, and I can't find any way to get it back. Anyone have any ideas?
Edit: it might be useful to add that PHP auto-indenting works just fine, such as making indentation between brackets.
You can install "Tag" plugin using package control . This question suggests the plugin has issues, but I haven't noticed any that would be a problem.
Possible duplicate:
How do I reformat HTML code using Sublime Text 2?
See dardub 's answer...
OR better yet (just noticed that!) peter 's answer:
Just select all lines ( Ctrl + A ) and then from the menu select Edit → Line → Reindent. This will work if your file is saved with an extension that contains HTML like .html or .php.
** for me it worked on ST3
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.