You don’t need any plugins to do this. Just select all lines (CTRL+A) and then from the menu select Edit → Line → Reindent. This will work if your file is saved with an extension that contains HTML like .html or .php.
If you do this often, you may find this key mapping useful:
{ "keys": ["ctrl+shift+r"], "command": "reindent" , "args": { "single_line": false } }
If your file is not saved (e.g. you just pasted in a snippet to a new window), you can manually set the language for indentation by selecting the menu View → Syntax → language of choice before selecting the reindent option.
Related Posts:
- What is the default font of Sublime Text?
- Sublime Text 2 – Show file navigation in sidebar
- Showing the same file in both columns of a Sublime Text window
- Sublime Text 2 – View whitespace characters
- How to autocomplete HTML tags in Sublime Text 3?
- Indent starting from the second line of a paragraph with CSS
- Unregistered Sublime Text
- omparing the contents of two files in Sublime Text
- Selecting multiple lines in Atom
- Autoindent on Sublime Text
- Is HTML considered a programming language? [closed]
- Open source social media icons to download and use on website? [closed]
- How to make a monopoly board using css grid?
- Convert HTML to PDF in .NET
- How to add a browser tab icon (favicon) for a website?
- Redirect from an HTML page
- Redirect from an HTML page
- What is ' and why does Google search replace it with apostrophe?
- What’s the difference between ” ” and ” “?
- navigate back with PHP form submission
- Should I use tag for icons instead of ? [closed]
- How am I supposed to use index.html?
- Open link in new tab or window [duplicate]
- Half circle with CSS (border, outline only)
- Line break in HTML with ‘\n’
- CSS calc width and height values
- Web scraping redoc web api
- IndentationError: unindent does not match any outer indentation level
- Failed to load resource: the server responded with a status of 404 (Not Found)
- What is & used for
- HTML encoding issues – “” character showing up instead of ” “
- How to horizontally center an element
- Center image using text-align center?
- Unblur content inside blurring background div
- Adding a favicon to a static HTML page
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found) css
- Maximum call stack size exceeded error
- How to properly use jsPDF library
- How do I link a JavaScript file to a HTML file?
- Edit webpage with javascript trick – how to “unedit”?
- Can I use complex HTML with Twitter Bootstrap’s Tooltip?
- See answer keys in Google Form (quiz) source page?
- CSS Background Opacity [duplicate]
- Angular, image not found (GET 404)
- what do
- CSS Background Opacity [duplicate]
- reCAPTCHA ERROR: Invalid domain for site key
- Google Chrome Uncaught (in promise) DOMException while playing AUDIO
- Making a
- Android WebView err_unknown_url_scheme
- How to make a word underline in Markdown
- Customize icon for “Add to home screen”
- How to create an HTML button that acts like a link
- What do < and > stand for?
- ChartJS beginAtZero, min, max doesn’t work
- IndentationError: unexpected indent error
- How do I check whether a checkbox is checked in jQuery?
- how to fix : ” TypeError: Cannot read property ‘addEventListener’ of null”…?//
- Cannot set property InnerHTML of null [duplicate]
- ReferenceError: $ is not defined
- How to fix “Cannot read property ‘addEventListener’ of null” error [duplicate]
- React.js: Set innerHTML vs dangerouslySetInnerHTML
- What to do with “Unexpected indent” in python?
- What’s the difference between HTML ‘hidden’ and ‘aria-hidden’ attributes?
- How to create an HTML button that acts like a link
- How do I check whether a checkbox is checked in jQuery?
- count(): Parameter must be an array or an object that implements Countable error in php
- jQuery document.createElement equivalent?
- Can I force a page break in HTML printing?
- count(): Parameter must be an array or an object that implements Countable error in php
- How do I vertically align text in a div?
- iframe refuses to display
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- What is the difference between HTML tags and ?
- Hide scroll bar, but while still being able to scroll
- CSS background-image-opacity?
- How to create an HTML button that acts like a link
- Resize image proportionally with CSS?
- What character encoding is >?
- HTML 5: Is it
,
, or
?- What is the main difference of
and- Setting table column width
- How to make a word underline in Markdown
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- How to align a
to the middle (horizontally/width) of the page [duplicate]- How do I vertically align text in a div?
- What does In html mean
- How to set a border for an HTML div tag
- How can I center text (horizontally and vertically) inside a div block?
- How do I add an image to an HTML file?
- iframe refuses to display
- Embed image in a
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Setting table column width
- Why does z-index not work?
- How to assign multiple classes to an HTML container?
- How to play audio?
- Uses for the ‘"’ entity in HTML
- How do I vertically center text with CSS?