sublimetext_indentxml icon indicating copy to clipboard operation
sublimetext_indentxml copied to clipboard

Indent without sorting of attributes

Open Jones-S opened this issue 10 years ago • 10 comments

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

Jones-S avatar Jun 25 '14 09:06 Jones-S

+1 ,for json too ,it will even help if you add an option to how the re-arrange the attr/prop ,something like CssComb.

ctf0 avatar Sep 10 '14 06:09 ctf0

I'd also greatly appreciate the ability to indent my XML without the attributes being re-arranged.

iGemini avatar May 14 '15 12:05 iGemini

+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.

igrigorov avatar Jun 24 '15 13:06 igrigorov

+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 .

raghu777 avatar Jun 24 '15 14:06 raghu777

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)

vclayton avatar May 19 '16 15:05 vclayton

+1

Also a config parameter for number of spaces for each indent would be nice.

orchetect avatar Dec 30 '17 07:12 orchetect

+100500, please don't change the order of attributes

slishnevsky avatar Aug 02 '18 13:08 slishnevsky

I am using on Mac, where can I find local copy of package? It seems package is unzipped and no way to open it.

hualig avatar Jan 25 '19 14:01 hualig

+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.

fsinisi90 avatar May 07 '19 16:05 fsinisi90

Or can you please at least write it to the readme file? 🙏

panda7789 avatar Apr 07 '20 06:04 panda7789