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

Allow fixed indent of continuation lines

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • None
    • 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

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes