#21 leading punctuation duplication

closed
nobody
5
2006-05-05
2001-08-30
Anonymous
No

When a single line such as:

. this is a test line tra la la la la foo bar bazz length1 length2 length3 length4 length5

is reformated (ctrl+k j) the leading punctuation is duplicated on the subsequently created lines. I can't tell if this is a feature or not - it seems like it might be useful in certain cases, however it interferes with long sequences of C format strings such as "%s, %s, %s, %s, %s" - the %'s are duplicated and sometimes moved around, invalidating the format.

Discussion

  • Marek Grac
    Marek Grac
    2001-09-06

    Logged In: YES
    user_id=134000

    This is feature but there should be options to turn it on
    and set in off defaultly. But there is no such option yet

     
  • Logged In: NO

    BTW, the "feature" is to handle reformatting comments. If
    I write

    # this is a shell comment, pretend it's really long

    and ^KJ on it, I get

    # this is a shell comment,
    # pretend it's really long

    as opposed to, say, ^J in pico, which would leave me with

    # this is a shell comment,
    pretend it's really long

    which turns the last half into a non-comment. I agree that
    this should be switchable by a ^T and .joerc option, but
    _please_ don't take it away! It's a very intelligent
    feature, considering that it will also handle indented
    comments properly!

    Hal

     
  • Logged In: NO

    This feature is critical for email quoting.

    Word-wrapping C source is just plain wrong anyway,
    so I don't see a problem.

     
  • Joe Allen
    Joe Allen
    2006-05-05

    Logged In: YES
    user_id=1000448

    This is now fixed: you can now define which leading punction
    you want duplicated.

     
  • Joe Allen
    Joe Allen
    2006-05-05

    • status: open --> closed