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
- Can I use complex HTML with Twitter Bootstrap’s Tooltip?
- Making a
- How do I check whether a checkbox is checked in jQuery?
- How can I set the default value for an HTML
- the use of `%3F` in URL
- How to place a text next to the picture?
- CSS: Moving the text down a few pixels but keeping the background still?
- CSS: Moving the text down a few pixels but keeping the background still?
- What are .tpl files? PHP, web design
- How to use css first-child with :not()
- How to “crop” a rectangular image into a square with CSS?
- Url.Action parameters?
- How to embed a PDF viewer in a page?
- What is PEP8’s E128: continuation line under-indented for visual indent?
- Adding image inside table cell in HTML
- Full-screen iframe with a height of 100%
- How do I set vertical space between list items?
- node.js error message events.js:183 throw er; // Unhandled ‘error’ event
- Display XML content in HTML page
- Is it possible to append to innerHTML without destroying descendants’ event listeners?
- How can I center a div within another div?
- How to align content of a div to the bottom
- Why write script type=”text/javascript” when the mime type is set by the server?
- RegEx match open tags except XHTML self-contained tags
- How can I copy to clipboard in HTML5 without using flash?
- CSS/HTML: Create a glowing border around an Input Field
- HTML make text clickable without making it a hyperlink
- Getting HTML form values
- Full Page < iframe >
- Change cursor to hand when mouse goes over a row in table
- How to run a function when the page is loaded?
- CSS table td width – fixed, not flexible
- Disabled href tag
- Creating Accordion Table with Bootstrap
- Creating Multiple Modals on a Single Page
- Why are my divs overlapping?
- Override USER AGENT STYLE SHEET – Chrome
- Javascript, viewing [object HTMLInputElement]
- Why onbeforeunload event is not firing
- aking a flex item float right
- Links not clickable on mobile devices in WordPress
- How can I access http://localhost/wordpress/wp-admin/install.php?
- wp_editor adds HTML entities to the content
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Contact Form 7 – Give each checkbox a class?
- How do you get words to show up at the bottom instead of beside a left-aligned photo? [closed]
- Header has extra HTML block at top before my code
- Migrating content from an old solution. How to easily change hardcoded hyperlinks in legacy content
- Add multiple=”multiple” attribute to categories dropdown
- How to properly insert a link to a template in WordPress?
- Show post in slider
- How to insert html/css/javascript code to wordpress plugin
- Add a class to the anchor tag on HTML5 gallery
- How can I wrap html around the output of the_time function?
- How put links in wordpress dynamic sidebar?
- Use DOMDocument with ob_start breaks my HTML code
- Is it possible to add a ribbon in the background of h1 on every page?
- Is there any tool to find lines of codes responsible to generate front-end HTML elements?
- Search WordPress using static html page
- render html no formatting
- Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- File Uploader – Upload without adding to Media Library
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- Adding attribute to the post.php form tag in wp-admin
- Some images on WordPress site are suddenly gone
- I have html form and need to make it work in text editor on template. Only problem is it has .sccs styling file
- Why is WordPress swapping double quotes (“) to curly quotes (“) and how do I stop it from happening?
- Display GIF as Facebook link thumbnail
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- I have an odd field with a purple background, mentioning HTML-codes to use while leaving comments
- How to use wp_ajax_set_post_thumbnail?
- Passing a value from an input field to a php function in WordPress?
- Show subcategory name selected in specific category woocoommerce
- How to add an ID to an existing HTML element?
- How to Take Logo Out of Navigation Menu? [closed]
- Implementing Select2 plugin into WordPress
- Displaying html table on post content
- can’t update plugins or wordpress or install new plugins [duplicate]
- Loading custom jQuery and HTML in a WordPress page
- Can I add a widget to the of my site?
- nested divs, classes for a grid in loop [duplicate]
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- WP_Query not returning results
- Post title appears twice in browser title bar
- How do I link the side images?
- WordPress adds ‘noindex’ tag to search results. Anything I can do about it?
- How can we get Buddypress to interpret HTML entities correctly?