#331 Smart Indent

Completed
closed
Neil Hodgson
None
2
2009-07-03
2006-05-25
Anonymous
No

Indents wrapped lines to the same position as the
indent at the start of the line, e.g.

This is an example line that is wrapped
here and not smart indented at all but goes
back to the left margin.

This is an example line that is wrapped
here using smart indent. Each wrapped line
matches the previous indent level and is useful
for showing the structure of the document in an
outline format. Useful for latex.

Both of the above examples would contain no line
breaks. They are single wrapped lines. Yes I know there
is a fixed indent option for the following lines but it
does not take account of different levels of indent.

Keep up the good work,

Tim.
tim_milstead@yahoo.co.uk

Discussion

<< < 1 2 (Page 2 of 2)
  • maXmo
    maXmo
    2009-05-23

    Question on design: why

    enum \{ eWrapNone, eWrapWord, eWrapChar \} wrapState;
    int wrapWidth;
    int wrapVisualFlags;
    int wrapVisualFlagsLocation;
    int wrapVisualStartIndent;
    int actualWrapVisualStartIndent;
    

    are members of Editor? Shouldn't they be in ViewStyle? Is it ok to move them there?

     
  • Neil Hodgson
    Neil Hodgson
    2009-05-25

    They were probably added to Editor because the issue wasn't thought about. They probably do belong in ViewState.

     
  • maXmo
    maXmo
    2009-05-25

    People interested in smart indent, what do you think is better? SC_WRAPINDENT_SAME or SC_WRAPINDENT_INDENT? See my thoughts in FR#2796119 (4th post).

     
  • Martin Spacek
    Martin Spacek
    2009-05-26

    From feature request ID: 2796119:

    SC_WRAPINDENT_FIXED - current behavior, default
    SC_WRAPINDENT_SAME - wrapped lines are aligned to first line indent
    SC_WRAPINDENT_INDENT - first line's indent + yet one more indent (as
    defined by document).

    As far as I undertsand it, I prefer SC_WRAPINDENT_SAME, as described in the initial comment here by Tim. This is the way TextPad works. I've never heard smart indent described as it is for SC_WRAPINDENT_INDENT. But it sounds like SC_WRAPINDENT_SAME is just a special case of SC_WRAPINDENT_INDENT, where the extra indentation is set to zero, no?

     
  • maXmo
    maXmo
    2009-05-26

    yes

     
  • Neil Hodgson
    Neil Hodgson
    2009-07-03

    • milestone: --> Completed
    • status: open --> closed
     
<< < 1 2 (Page 2 of 2)