how to install sublime text indent xml in sublime 3
Solution 1
None of the above answers worked for me as they appeared to be missing a crucial 'step' to the process (step 2 below). This is how I got it to install for me in Windows using Sublime Text 3:
- Install Package Control (Tools > Install Package Control...)
- Open Package Control (Ctrl+Shift+P) and type 'Package Control: Install Package' and then press Enter.
- Sublime will attempt to load any custom repositories then offer a list of packages available.
- At this point, I was able to successfully search for 'indent xml' and have it appear in the list and install by pressing Enter with it selected.
Solution 2
The most error free way, is to
- Install the
Package Control
First - Ctl + shift + P then type Install Package and press Enter
- Type Indent XML and press Enter
To Use:
- Open the
XML
file that you need to reformat - Ctl + shift + P then type Indent XML
- Press Enter
Your Document will then update.
For information how to install the package control please see:
https://packagecontrol.io/installation
And
https://packagecontrol.io/docs/usage
Solution 3
If you are using Mac, go to the menu as follows:
Sublime Text -->
Preferences -->
Package Control -->
Install Package
When the list box opens, type indent xml
( or a different package indentx
).
Once the package is installed, Command+Shift+P
Then choose indent xml
to automatically format your file.
Solution 4
The location is system dependent, but are located at:
- OS X:
~/Library/Application Support/Sublime Text 3/Packages/
- Windows:
%APPDATA%/Sublime Text 3/Packages/
- Linux:
~/.config/sublime-text-3/Packages/
Solution 5
Try this (for Windows only):
Open Sublime Text 3
Ctrl+Shift+P
Type: Package Control: Install Package
Then lastly type: indent XML
after installing the package open an XML file then press Ctrl+K next press Ctrl+F or you can go to Selection->Format->Auto Indent.
Stéphane Gerber
Updated on March 06, 2020Comments
-
Stéphane Gerber over 4 years
I am trying to install https://github.com/alek-sys/sublimetext_indentxml in sublime text 3. I read
In Sublime Text 3 - clone project from Github into Packages folder.
Doesn't seem to work.
I am not sure where the Packages folder is.
-
Adrian about 8 yearsI've done everything in the directions you referenced, closed the app and relaunched. Once I've got it "installed", how do I get the XML to indent?
-
Alegrowin almost 8 years@Adrian Package Control is a GUI package manager, once install go in Sublime Text 3 and click on the preference Tab, then click on Package Control, install package, after type indentXml
-
cja about 7 yearsstep 2 doesn't find anything like indent xml
-
jenovachild about 7 years@cja I'm having the same issue. Nothing comes up when I type 'indent' or 'indent xml' or 'indentXml'
-
Junchen Liu almost 7 yearsboth of you what operating systems do youo use? i haven't got a mac or linux only tested on windows
-
Dimitri Kopriwa over 6 yearsThere is nothing in package control that is called
indent xml
-
ScottM almost 6 yearsMine only listed it until I installed it. You could try Package Control > List Packages, and see if it is already installed.
-
nakeer almost 6 yearsFormat -> auto indent saved me
-
Håkon Seljåsen over 5 yearsIt is called IndentX and works as @1247p describes bellow.
-
nilesh over 5 yearsDimitri, I think you missed to do #2 like me. These steps work
-
vosicz over 5 yearsIndent XML can not be found until you choose Install Package first
-
Shrirang over 4 yearsindent xml is already added in sublime text 3. no need to add. select all xml code, press (Ctrl+Shift+P), type indent xml and hit enter
-
DATALOT over 3 years@Shrirang Nothing appears typing "indent xml"