I'm using Sublime Text 2 (with the Indent XML plugin) for editing XML files.
How can I configure Sublime Text to automatically execute the "Indent XML" action right after opening a file named *.xml?
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.
No, the indentation does not matter in XML documents.
SublimeText Indent pluginIt is smart enough to recognize XML or JSON even if you are editing plain text.
To indent / prettify / beautify XML, I use SublimeText Indent plugin:
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