Author Topic: Word wrap with indenting  (Read 5698 times)

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Word wrap with indenting
« on: March 07, 2014, 01:35:38 AM »
Is there a way to make SlickEdit word wrap in a way that respects the indent level of the line above it?

For example:

Below are some very well-known works of
poetry.  These pieces are important to our
literary history and to our culture.   

Mary Had a Little Lamb

    Mary had a little lamb. Its fleece was
    white as snow.  And everywhere that Mary
    went, the lamb was sure to go.

Humpty Dumpty

    Humpty Dumpty sat on a wall.  Humpty
    Dumpty had a great fall.  All the king's
    horses and all the king's men couldn't
    put Humpty together again


Our Tech Writers are looking for a text editor that can do this in order to author ISPF help panels.  We will purchase SlickEdit licenses for them if we can find a way to make this work.

If this is not possible, is it something you might consider for a feature request in the upcoming release?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Word wrap with indenting
« Reply #1 on: March 08, 2014, 04:02:16 AM »
This is an area I would like to see improved. There are some heuristics that can be used to determine the left edge. It needs to be configurable and support bullets. The right edge is another story. It's best for the user to specify the right margin. Otherwise, you end up with a shrinking right margin or worse.

No need to request this feature. It's definitely needed. We are already doing automatic word wrap for javadoc and this is much harder.

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Re: Word wrap with indenting
« Reply #2 on: March 08, 2014, 04:50:31 PM »
Thank you, Clark.   The right margin isn't an issue as that is fixed and specified by the user.  We would just like the left side to wrap around to the same starting column as the line above it.  That way indenting will work with word wrap.
   

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Word wrap with indenting
« Reply #3 on: March 08, 2014, 04:59:00 PM »
That's a lot less than what I was thinking. In any case we need an auto left margin setting. How smart is is can be enhanced.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Word wrap with indenting
« Reply #4 on: June 15, 2014, 05:02:33 PM »
Checking into this in more detail now.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Word wrap with indenting
« Reply #5 on: June 24, 2014, 12:35:00 AM »
I've been able to add some pretty cool word wrap features. It should handle your needs very well. These are word wrap features I've wanted to do for a long time.

Here are some details:

Typing, backspace, and Del keys all do very full word wrap (all but your justification options). The idea is to word wrap your paragraph as you type so you don't have to fix it later. I couldn't do this in the early versions of SlickEdit because the computers simply weren't fast enough to keep up with typing. Definitely no problem now.

A new "Auto Left Margin" feature has been added. I love this. SlickEdit will determine the left margin based on the first non blank character in the line. Then all you need is to define a right margin or a fixed width right margin (another new feature).  When you set a fixed width right margin, the right margin is calculated by leftMargin+FixedWidthRightMargin-1 where the leftMargin is the first non blank.

If you're a command line guy like me, you can turn on "Auto Left Margin" simply by "ma 74" to turn on auto left margin and set the right margin to 74. A command like "ma 74w" will turn on auto left margin and set the fixed width right margin to 74.

Blank lines delimit paragraphs. When "Auto Left Margin" is on, changing the indent also starts or ends a new paragraph.

There aren't any special options for handling custom hanging indents but this could be added in the future.

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Re: Word wrap with indenting
« Reply #6 on: July 03, 2014, 08:41:54 PM »
This sounds great, and I'm looking forward to it.  :)