sublimetext_indentxml
sublimetext_indentxml copied to clipboard
Indent without sorting of attributes
Hey there I'm not sure whether this is the right place to address this issue, but I did not find any comment function on github. Thanks for this plugin first of all! Helps me a lot. there is just one thing: I don't want the plugin to rearrange my attributes of my xml nodes. Could you tell me where I can disable that feature? Thx a lot
Jonas
+1 ,for json too ,it will even help if you add an option to how the re-arrange the attr/prop ,something like CssComb.
I'd also greatly appreciate the ability to indent my XML without the attributes being re-arranged.
+1 - sorting the attributes adds a lot of difficulty when trying to diff the previous (unformatted) and the formatted version of an XML file. However, I'm not very optimistic if this can be fixed, it may be inherent to minidom, which this plugin uses.
+1 - Need this feature.
On Wed, Jun 24, 2015 at 7:27 PM, giovannibgr [email protected] wrote:
+1 - sorting the attributes adds a lot of difficulty when trying to diff the previous (unformatted) and the formatted version of an XML file. However, I'm not very optimistic if this can be fixed, it may be inherent to minidom, which this plugin uses.
— Reply to this email directly or view it on GitHub https://github.com/alek-sys/sublimetext_indentxml/issues/59#issuecomment-114876469 .
For those looking to indent JSON without sorting, you can edit your local copy of the package. Change the last line from:
return json.dumps(parsed, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
to
return json.dumps(parsed, sort_keys=False, indent=4, separators=(',', ': '), ensure_ascii=False)
+1
Also a config parameter for number of spaces for each indent would be nice.
+100500, please don't change the order of attributes
I am using on Mac, where can I find local copy of package? It seems package is unzipped and no way to open it.
+1 - sorting the attributes adds a lot of difficulty when trying to diff the previous (unformatted) and the formatted version of an XML file. However, I'm not very optimistic if this can be fixed, it may be inherent to minidom, which this plugin uses.
You're right, another tool should be used according to this stackoverflow answer.
Or can you please at least write it to the readme file? 🙏