Qt Creator: Don't add "*" to start of comment lines, (still) auto-indent inside comments
-
In Qt Creator, when I hit enter while typing inside a style /* .... */ comment, a "*" is normally inserted at the start of the next line. If I remove "*" from the 2nd line (before I continue typing; it won't appear automatically on the 3rd, but then the line isn't automatically indented.
Is there a way I can change that? I basically want to have comments without "*" on the 2nd and subsequent lines, and with the option of auto-formatting content.
Maybe this is related to clang-format (which is generally enabled), but I can't find a lot of information about comments formatting in its documentation...
-
Maybe I'm blind or something, but I don't quite understand what options you are referring to. I see no mention of "*" on continuation lines. Also, the "automatic indentation" settings I can find, are the ones that appear to have no effect in the situation I was taking about. So what are you taking about exactly?
-
Maybe I'm blind or something, but I don't quite understand what options you are referring to. I see no mention of "*" on continuation lines. Also, the "automatic indentation" settings I can find, are the ones that appear to have no effect in the situation I was taking about. So what are you taking about exactly?
@toralf
I see Options > Text Editor > Completion > Documentation Comments > Add Leading Asterisks option. Although it is under "Documentation Comments" this seems to work on your multiline comments in code. I think this is as close as it gets for what you want? -
@toralf
I see Options > Text Editor > Completion > Documentation Comments > Add Leading Asterisks option. Although it is under "Documentation Comments" this seems to work on your multiline comments in code. I think this is as close as it gets for what you want?Yes, that works for the leading '*' at least. Never thought to look at that options page... Actually, I hardly even noticed it when I checked, although I must have reviewed its settings in the past.
Thanks.
Like I said, I guess the indentation bit might be a clang-format issue. It's still unclear to me (from reading the docs) how it's supposed to format comments.