im wondering if there is any Sublime Text 3 plugin besides HTML Tidy which is able to reindent or reformat parts of HTML Code
ctrl + shift + P and type Tidy PHP , or you can use the ctrl + alt + T keybinding.
Beautify while editing (Experimental / Sublime Text 3 only) To beautify your code when while editing a document, set the format_while_editing setting to true in HTMLPrettify.
That's quite simple in Sublime. Just Ctrl+Shift+P (or Command+Shift+P on MacOS) to open the tools pallet, type reindent , and pick Indentation: Reindent Lines . It should reindent all the file you are in, just remember to save before running the command, or it may not appear.
Thanks a lot for your answer, but i found a nice, built in approach of sublime text. Just select everything (CTRL + a (Windows) or CMD + a (Mac) and click this in the menu
Edit → Line → Reindent
maybe this helps also others
EDIT(2017): You can also use key combination (without need for mouse)
CTRL + SHIFT + P (Windows)
CMD + SHIFT + P (Mac)
then type 'Reindent' and select the fist option 'Indentation: Reindent Lines'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With