Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:08:27+00:00 2026-06-14T04:08:27+00:00

Ok, my situation is a bit different than all the threads here about formatting

  • 0

Ok, my situation is a bit different than all the threads here about formatting HTML. Also, I’ve installed about every HTML formatting plugin out there with mixed results and none really solve my issue.

Also, configuring these plugins can be difficult since I’m not a programmer and some authors don’t provide enough information to customize their plugins.

For now the only plugin that formats my HTML somewhat Ok is HTMLTidy, the problem is that it uses too much space per tag. See my HTML example below.

I also tried what they mentioned in this thread and it only works to some extent as far as indentation goes, but not really for ‘true’ markup formatting.

All I want to do is turn this markup:

<ul>
   <li>
     item here
   </li>
   <li>
     item here
   </li>
   <li>
     item here
   </li>
</ul>

Or this one:

<p>
   Content...
</p>

Into this:

<ul>
   <li>item here</li>
   <li>item here</li>
   <li>item here</li>
</ul>

And this:

 <p>Content...</p>

Having the content of every tag in a separate line from the opening/closing tags is a waste of space for me.

Any idea how to accomplish this either by modifying something in TidyHTML or manually, or any other way for that matter?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:08:29+00:00Added an answer on June 14, 2026 at 4:08 am

    Note: This solution works only in ST2, because at this moment (7/31/14) HTMLTidy is not available for ST3.

    I figured a temporary solution, not ideal by any means, but…

    1. Go to: Preferences -> Key Bindings - User. You will be editing the file Default (Windows).sublime-keypmap.

    2. Add these two instructions to that file (note that the instructions need to be inside the [ ] brackets):

       [
         { "keys": ["ctrl+shift+r"], "command": "reindent" , "args": {"single_line": false}},
         //Indent code -- http://stackoverflow.com/questions/8839753/formatting-html-code-using-sublime-text-2
      
         { "keys": ["ctrl+alt+t"], "command": "html_tidy"}
         //HTMLTidy key binding
       ]
      
    3. Save the file.

    4. Make sure you have HTMLTidy installed. Open HTMLTidy’s Settings file HtmlTidy.sublime-settings: Preferences -> Package Settings -> HtmlTidy -> Settings - Default.

    5. Look for "indent": true, (include double quotes and comma) and change it to false.

    6. Save the file.

    7. Go back to your HTML file and select a section of the code you want to format in one line. Yes, it doesn’t work if you select the entire markup o_O. It will only leave what’s inside the <body> tag, and it will delete everything else (<html>, <head>, etc).

    8. Press CTRL+ALT+T to execute TidyHTML. This will shrink your markup and make the tags in one line.

    9. Finally press CTRL+SHIFT+R to execute the indentation.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bit of a situation. I've consumed about fourty-eleven different tutorials/books/videos on
Here's the situation - its a bit different from the other database/password questions on
This is a bit of an odd situation. Here's what's happening. So, we have
I'm in a bit of a doubt about this subject. Situation: I have conducted
I know I already asked related question but now it's a bit different situation.
I know this has been talked about here before. However, my situation is a
The situation is a bit hard to explain, I'll do my best. I have
My situation is a bit complex. I want to create $config rules for my
Strange situation - examples from apple works, but after i change them a bit,
I will try to explain the situation as it is a little bit more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.