Uploaded image for project: 'Qt Creator'
  1. Qt Creator

Decoupling Auto-indent and cut&paste in Qt Creator editor



    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Editors
    • Labels:
    • Environment:



      My C++ commenting style is to place the // in column 1 & 2. I.e:-

      //      This conditional does ...
              if ( foo ) {
                  bar ( x, y );

      If I use use "Auto-Indent Selection", then the comment is indented thus:-

              //      This conditional does ...
              if ( foo ) {
                  bar ( x, y );

      That's fine - I just don't use your Auto-indent!

      But if I copy and paste a section of code, the same happens with my comment!
      I need cut&paste, so either I have to reformat my own code by hand after, or
      use another editor and reload the file in Qt Creator. That is an annoyance.

      Could you decouple the cut&paste and the auto-indent functionality please? They are
      not the same, and I'm not sure why any kind of modular user interface design would
      conflate them. I'm sure plenty of cut&paste moves the code between the same
      nesting levels, and if not, there is always the auto-indent facility.

      If you are wondering why I put the // on the left, it is because it gives me at least
      2 more columns of comment space when trying to control the maximum length of source
      lines on a reasonable width editor window. BTW, thank you for putting the right margin
      "bar" on the latest version (2.2.0).


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              erikv Erik Verbruggen
              john frack John Frack
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes