Indent XML
Reindent XML and JSON files in Sublime Text
By
braver
Created
Installations minus removals
Upgrades
- 511,442 installs
- 1 stars
Links
Versions
1.0.3
·
Indent XML and JSON in Sublime Text
Auto-indent data structures in XML or JSON format to readable format. Uses Python's xml.dom.minidom and json libraries under the hood to go from ...
<root><node attr="1" attr2="4"><node /></node></root>
... to this:
<root>
<node attr="1" attr2="4">
<node/>
</node>
</root>
Features
- Indent only selected text
- Supports multiple selections of XML and JSON data
- Detects format based on syntax or heuristics (in plain text)
- Commands are available via the Selection menu, the command palette and keyboard shortcuts.
Key bindings
Uses the Ctrl+K, Ctrl+F "chord" command, meaning hold Ctrl, press K then press F, release Ctrl. On MacOS use Cmd instead of Ctrl.
Installation
Just use Package Control and search for the "Indent XML" plugin, or copy the install command from the PC page for this package.
Testing
- Have both Indent XML and UnitTesting installed manually in the ST Packages directory.
- Run the
./run_tests.shscript.
Buy me a coffee
Please feel free to make a little donation towards the coffee that keeps this labour of love running. It's much appreciated!
Originally forked from alek-sys/sublimetext_indentxml.