alek-sys / sublimetext_indentxml

Plugin for Sublime Text editor for reindenting XML and JSON files
MIT License
534 stars 135 forks source link

Optionally Indent attributes #34

Open wabiloo opened 11 years ago

wabiloo commented 11 years ago

Would be great to be able to specify that XML attributes should also be indented. I have XML files that are full of attributes. I'd like them to be indented in the following way:

<?xml version="1.0" encoding="UTF-8" ?>
<Reply Success="TRUE" >
   <JobInfo Name="Job 1"
            GUID="{62A160F3-79E8-4358-9073-EDCAE4B4ED75}"
            State="NEX_STARTED"
            Status="STARTED"
            Progress.DWD="32"
            Description="Example Job"
            User="WatchFolder"
            SourceDescription="C : \ _ test . mp4"
            AgentIP="192.168.62.133"
            Priority.DWD="5"
            DeleteProcessedSource.DWD="1"
            StartTime_SCM="2008-05-1519:23:41" />
</ Reply>
DerZyklop commented 8 years ago

@wabiloo have you found a way (or other plugin) to do this?

Skintillion commented 6 years ago

That has a lot of white space, I personally prefer

<?xml version="1.0" encoding="UTF-8" ?>
<Reply Success="TRUE" >
   <JobInfo 
        Name="Job 1"
        GUID="{62A160F3-79E8-4358-9073-EDCAE4B4ED75}"
        State="NEX_STARTED"
        Status="STARTED"
        Progress.DWD="32"
        Description="Example Job"
        User="WatchFolder"
        SourceDescription="C : \ _ test . mp4"
        AgentIP="192.168.62.133"
        Priority.DWD="5"
        DeleteProcessedSource.DWD="1"
        StartTime_SCM="2008-05-1519:23:41" />
</ Reply>
potpath commented 5 years ago

I would suggest https://www.paraesthesia.com/archive/2015/03/12/xml-tidy-in-sublime-text/ as tidy is quite flexible.