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

Allow fixed indent of continuation lines

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None

      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.

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

            kandeler Christian Kandeler
            rellenberg Robert Ellenberg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes