Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16666

Allow fixed indent of continuation lines

    XMLWordPrintable

    Details

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

      Description

      I propose adding an additional option for continuation line indent:

      1. "Not at All"
      2. "With Spaces"
      3. "Regular Indent"
      (new)4. "Fixed"

      The "Fixed" indent would indent all continuation lines by one indent, relative to the current level:

      void foo() {
          ...
          my_function(arg1,
              arg2,
              arg3);
         ...
         if (bar) {
              other_function(arg1,
                  arg2,
                  arg3);
          }
      }
      

      With this scheme, continuation lines are visually distinct, but their alignment does not change if "my_function" or "other_function" is renamed. Currently, continuation lines are aligned with the end of the previous entry:

      ...
          my_function(arg1,
                      arg2,
                      arg3);
      ...
      

      This can cause trivial merge conflicts if one branch renames the function, and another renames only an argument.

        Attachments

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

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              rellenberg Robert Ellenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes