Author Topic: Disable automatic HTML indent  (Read 4989 times)


  • Community Member
  • Posts: 14
  • Hero Points: 0
Disable automatic HTML indent
« on: February 27, 2008, 05:14:59 pm »
How do I disable SlickEdit from automatically trying to indent HTML text.  Trying to get it to do what I want is like some sort of logic puzzle.  Hit the wrong key and it screws up everything.  Most of the time I have no clue what it thinks it is trying to do.  I have tried playing with the file extension setup but there are a bewildering number of options there.  A text editor should not make it hard to do the simple things.


  • Senior Community Member
  • Posts: 238
  • Hero Points: 23
  • User-friendly geek-speak translator extraordinaire
Re: Disable automatic HTML indent
« Reply #1 on: February 27, 2008, 07:36:06 pm »
I *think* this might be the XML/HTML Formatting feature.  Look up "XML/HTML Formatting" in the Help > Index, and you will see the section that describes how to turn the feature on and off (Enabling/Disabling...). Essentially, you can toggle this feature on and off from the Document > XML/HTML Formatting menu. This feature is really doing two things: wrapping content and formatting the layout.

For your situation, it sounds like you could either disable the complete feature entirely, or just the Tag Layout portion if you like the wrapping. For this one, I think it does help to spend some time configuring the settings before it will work exactly to your liking. Perhaps you could disable for now, then if you're interested, when you get more free time, customize it to work the way you want. Hope this helps!


  • Community Member
  • Posts: 47
  • Hero Points: 2
Re: Disable automatic HTML indent
« Reply #2 on: March 04, 2008, 04:18:18 pm »
I've seen mysterious behavior here as well.  I think the problem lies in tags that have a setting for "Match tag style of" on the General tab in the XML/HTML Formatting dialog.

For example, I set my (block) tag to "Preserve content" on the Content Wrap tab.  Then I set my div tag to "Match tag style of" (block).  But if I go to the Content Wrap tab for div, "Wrap tag content" is selected (and disabled).  So I wonder if what's happening is that my divs are getting wrapped because of this disabled setting rather than SE honoring the "Match tag style" setting.  That is, the default/selected/disabled value may take precedence over the match setting.

Also, it seems as though the settings applied during typing and the settings applied during a Beautify don't match.  Theoretically, if I type something like this:

Code: [Select]
<html><head></head><body><div>hello world</div></body></html>

SE should be formatting it as I go (doing newlines and indents and all that).  Then, if I immediately Beautify it, the code shouldn't change at all.  However, I will frequently see Beautify indenting differently than the as-I-type formatting.
« Last Edit: March 04, 2008, 04:21:48 pm by RobFreundlich »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Disable automatic HTML indent
« Reply #3 on: March 05, 2008, 11:08:54 pm »
Regretably, Beautification relies on a different parser and different code than as-you-type formatting. One of our goals is to unify these implementations.


  • Community Member
  • Posts: 52
  • Hero Points: 2
Re: Disable automatic HTML indent
« Reply #4 on: March 06, 2008, 12:44:20 am »
That's great news Scott!
After trying dozens of html/website authoring tools, including the major ones, I've discovered that none beat the formatting capabilities in SE, but it does take some time to figure out how the rules work.  For weeks I struggled with inconsistant indenting issues, until I figured out the what was happening.  It was what Rob pointed out above, in the XML/HTML Formatting Scheme Configuration dialog.  Some of the base tags had an indent which didn't match the indent I had set in the general HTML options.  I was expecting the options I set in the general HTML syntax indent to control all my html indenting, and didn't consider looking at the specific tag (or base tag) indenting configuration.  I've have it set now for a while, and everything works just like expected.

It also takes a while to learn how to set up the beautifier defaults to match the general defaults.  Combining these settings would be a great improvement and make things much more intuitive.  I'm not sure if there'd be a way to combine the indent settings for the HTML language, and the indent settings for the individual tags in the XML/HTML Formatting Scheme Configuration dialog.  This also has been a source of confusion for me.  Even putting a "Configure Schemes" button on the HTML indent options would help, to remind us that indenting is further controlled individually on a tag per tag basis.

PS... nice work on the beta/2008 product!  I didn't think SE could get much better than it already was but you proved me wrong.


  • Community Member
  • Posts: 47
  • Hero Points: 2
Re: Disable automatic HTML indent
« Reply #5 on: March 06, 2008, 12:03:28 pm »
Hi, Mitchel,

Can you give some more information about how you got both formatter settings to work properly/consistently, and to match each other?



  • Community Member
  • Posts: 52
  • Hero Points: 2
Re: Disable automatic HTML indent
« Reply #6 on: March 07, 2008, 01:02:17 am »
Hi Rob,

This is what I did to get everything matching for me...  (I use an indentation of 2)

Options->Languages->Web Authoring->HTML->Indent:
I select Syntax Editing on and to 2.  Although there's a few places this dosn't work as well as I'd like (when php is mixed with html), it does a very good job.
Turn Adaptive formatting off.  Not sure if this has the kinks worked out yet, and I don't really care how the docs 'used' to be formatted anyway.
Set Tabs to 2.
Turn off Indent with Tabs.
Turn off Insert real indent.
Turn on Indent selection when ...   (I don't think this matters to match styles, but I like this feature)
Turn on Backspace at beginning ...  (Don't think this matters either, but I like the behavior)
Turn off Dynamic Surround  (I don't find much use for this in html)
Turn on Syntax Expansion  (I LOVE this option, but DON'T use this option with [Automatically insert '>' when typing '<'] on the HTML formatting tab.

Options->Languages->Web Authoring->HTML->HTML Formatting Options:
Click Configure Schemes:
Click on the Tag Layout tab.
Insure all default tabs (braced) which have the indent editable have the same indent that was set earlier (in my case, 2).
If any tags do not inherit their traits from the default tabs, insure they also have the desired indent length.
This is where my problem was.  As soon as I set the default tabs in this dialog, my indenting worked as desired.

Now, for my beautification settings...
Indent tab:
Uncheck indent with tabs.
Syntax indent: 2
Tab size: 2
Original tab size: 0 (not sure if this matters)
Broken tag lines: Indent from tag column by: 2

Tags tab:
Refomat, Indent, End-tag, and End-tag required, and stand-alone all checked.
Insure block level tags also have Indent checked.

With these settings my indent formatting is almost always what I expect both dynamic and beautify.
Very rarely does it not work as I expect, as when mixing php and html sometimes.

Hope these settings work for you also,