https://bugs.kde.org/show_bug.cgi?id=438744

            Bug ID: 438744
           Summary: Feature request: Let indentation be indentation when
                    outcommenting lines
           Product: kate
           Version: 21.04.1
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: part
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: andreas_norda...@hotmail.com
  Target Milestone: ---

STEPS TO REPRODUCE
1. In Kwrite/Kate/KDevelop, mark the body of this C++ function and press
Ctrl+D:

void f() {
  {
    ;
  }
}

EXPECTED RESULT

Preferrably this:

void f() {
  // {
  //   ;
  // }
}

Or this (not my favourite, but also fine):

void f() {
  // {
    // ;
  // }
}

OBSERVED RESULT

void f() {
//   {
//     ;
//   }
}

The "// " comment prefix is inserted before, instead of after, the indentation.

I think it would be better to do the opposite – not change the indentation
level of the outcommented code.
This is to make it easy to visually follow the indentation level of an
uncommented block with the surrounding code.
As it is, it is even a bit hard to see which exact indentation level the code
is at when outcommented like this.
Third, it is what automatic code formatters do.

ADDITIONAL INFORMATION

The same applies to probably most languages supported by katepart, with the
notable exception of python, which already does the right thing! Well, the "not
my favourite, but also fine" alternative.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to