Author Topic: HTML wraps at 80 regardless of setting? -- Semi-resolved, plus feedback  (Read 6757 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Edited:  The unresolved/feedback points are in red, and are the key parts to read.

When I edit HTML files, tags and text within tags are wrapping at 80 columns no matter what, even if I disable word wrap and comment wrap!

I'm using SE 2008 on Vista.  My HTML and XML column and word wrap settings are fixed right margin at 100 columns.  Adaptive formatting for HTML is off*.

I would expect word wrapping to happen at column 100 as configured, rather than at 80.  Is this a bug?  Anyone have an idea what setting I might have missed, i.e. outside of the HTML tree in the Options dialog?  (All columns in the HTML tree are set to 100, even the grayed out boxes for the other comment wrap radio buttons).

EDIT: Aha, in the HTML Formatting Options node there are two checkboxes near the bottom that disable wrapping:  Enable content wrapping, and Enable tag layout.  And next to them is a button Configure Schemes... which pulls up a dialog where you can configure that actual comment wrap, tag wrap, and content wrap settings.  I suppose this is so you can configure different wrapping columns for different tags, which is a nice feature.

FEEDBACK: The HTML node in the Options dialog is very confusing because the options we're used to changing for other formats do not work as expected.  It might be good to rename them or remove them, or have hyperlinks to the formatting scheme configuration dialog, a la the adaptive formatting on/off hyperlinks.  The Configure Schemes button is not very prominent, yet it is the key to a lot of basic formatting settings in HTML files.  It might be good to call more attention to it.

Example repro steps:
1.  Configure HTML to wrap at column 100 (or better yet, configure it to not wrap at all).
1.  Open the attached file.
2.  Go to line 23 (starts with <a href="FAQ1">).
3.  Go to the end of the line.
4.  Press Del key to try to join with the next line.
EXPECTED:  Next line is short enough it should join onto line 23.
ACTUAL:  Not joined, cursor moves to beginning of line 24, and line 25 is joined to line 24.
ADDITIONAL NIT:  I don't think that word wrapping in HTML should join following lines onto a line that ends with
 or </p>.


Cheers,
C

* I turned AF off for HTML because in the attached file it keeps deciding to use 5 for indents for no apparent reason (the file uses 4 everywhere; nowhere is 5 used at all; but AF stats say 4 is used once and 5 is used three times, and seems to miss the many times 4 is used).  Please pardon the in-progress nature of the attached file, it's only in-progress because I'm reporting the issue on the spot so I don't forget to later.  ;)
« Last Edit: March 30, 2008, 05:50:04 pm by chrisant »

mitcheljh

  • Community Member
  • Posts: 52
  • Hero Points: 2
For the tab issue, have you tried checking the tab settings in the "XML/HTML Formatting Scheme Configuration" (click "Configure Schemes..." on the "HTML Formatting Options" dialog".  In particular, you'll want to check the (default) and (block) tab settings (on the Tag Layout tab).    I had the same problem you are having.  I specified a tab setting on the "Indent" options for the HTML language, but didn't check the tab settings for the individual tags (or tag groups).

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 35
I'm looking into the Adaptive Formatting indent issue for this specific file.  I think it's getting confused by the blank lines in between your blocks of code, but I'll see if I can make it a little smarter about those.

In the meantime, you can turn off Adaptive Formatting for specific settings.  You may already know this, but I thought I'd mention it anyway.  Since the indent-related settings are giving you trouble, I'd suggest you turn off Tabs, Syntax indent, and Indent with tabs.  That way, you can still use the case-related settings.  To do this, go to the Adaptive Formatting options node (Tools > Options > Languages > Web Authoring Languages > HTML > Adaptive Formatting).

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
I'm glad that you found the XML/HTML wrapping settings and got past your problem.  Thanks also for the feedback on how the options should be presented.

As for your comment that

Quote
I don't think that word wrapping in HTML should join following lines onto a line that ends with
 or </p>

in most cases I would agree.  (However, on a line that ends with
, if you hit Del at the end, it should still pull up the following line.).  Of course, this should be user customizable without adding too much complexity to the options dialog.  Perhaps that is the biggest challenge.  We'll look into this for a future release.



ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
@chrisant: thank for the detailed feedback. Since no good deed goes unpunished, I need a little more detail, please. You wrote, "The HTML node in the Options dialog is very confusing because the options we're used to changing for other formats do not work as expected." Can you be more specific? Which nodes? Which options?  Thanks.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Oh, yes, sorry.  The options I had in mind were the ones related to word wrap.  I think the main confusion is between Word wrap (in Word Wrap mode) and Enable content wrap (in HTML Formatting Options node).  The latter seems to do what I would have expected the former to do.  I can't figure out what effect (if any) the "Word wrap" setting has in HTML files.  If the "Enable content wrap" setting controls word wrapping in HTML, then maybe it belongs in the Word Wrap node.  The Configure Schemes dialog (from the HTML Formatting Options node) controls word wrapping details, and also other things.  Maybe the Word Wrap node could also have a Configure Schemes button, which pulls up the dialog with the current tab being "Content Wrap" instead of "General".

And of course the several different spots where you can set right margins in the Word Wrap and Comment Wrap nodes.  Those seem to have no effect that I am able to discern.  I can't tell if there are any settings besides the right margin indicator line that actually do anything in HTML in the Word Wrap node.

Phrased another way:  To control word wrapping, I would expect to go to the Word Wrap node and/or Comment Wrap node, but those seem to have no effect in HTML.  In HTML I have to go to another node, which has a button that can take me to another dialog where I can control the right margin differently for different contexts.  I am a simple HTML user, I just wanted all the right margins to be 100.  It seemed natural to set the right margin to 100 in the Word Wrap node.  Ideally perhaps the editor could ask me if I am trying to set all the right margins, and would I like for it to automatically set the right margin to 100 in the several different contexts, or would I like to pull up the Configure Schemes dialog so I can make more granular changes.
« Last Edit: March 31, 2008, 10:19:01 pm by chrisant »

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8

Word wrap is an older feature than either comment wrap or xml/html formatting.  Both comment wrap and xml/html formatting handle more advanced wrapping, such as Delete pulling up content from the following line and better indenting.  We think more users will prefer one of these when they are available.  Therefore, when both word wrap and comment wrap are enabled and you're typing in a comment, comment wrap will take precedence and word wrap in ignored.  The same is true for xml/html formatting.  I believe that is why you sometimes see no affect for word wrap.

If all you want is a simple html wrapping, this is what I suggest.  Go to the HTML Formatting Options node.  (From the Options dialog tree, go to Languages > Web Authoring Languages > HTML > HTML Formatting Options.)  In the Auto formatting options panel near the bottom, turn on Enable content wrap (your choice if you want to turn on Enable tag layout), and pick html as the default formatting scheme.  Then, click Configure Schemes... to bring up the XML/HTML Formatting scheme Configuration dialog.  Pick the html scheme in the first list box, and then select all the tag names in the second list box.  Click the Content Wrap tab under Settings, and choose Wrap tag content with Fixed right margin and set it at 100.

Now all your tags under html will wrap at 100, plus you'll get the better wrapping features that are not part of simple word wrap.


chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Right, thanks, I did that already (tried to express it in the original post in the "EDIT:" paragraph, but wasn't very clear, I'm afraid ;)).

I'm just giving feedback about how I think the product can become more intuitive.