Reputation: 2216
In Visual Studio 2019, are there any settings to allow the configuration of the multi-line comments in order to always align new star characters (i.e.*
)?
When inputting the first new line in a multi-line comment, a star (i.e. *
) character is automatically generated and aligned with the backslash (i.e. \
) character and not with the first star (i.e. *
) character:
It is really annoying to always have to manually fix this indentation issue. I have tried looking at the "Text Editor" formatting settings, however, there doesn't appear to be any settings for configuring multi-line comments. I also have been unsuccessfully searching around to see if there is an obvious fix.
Does anyone know how to make Visual Studio auto-align the star characters (i.e. *
) in multi-line comments with the proceeding star characters?
Upvotes: 1
Views: 1389
Reputation: 2216
Okay, I figured it out. @VRichardJP was exactly right - this formatting feature is for a Visual Studio extension to do. After trying a few, I found an extension that does exactly what I need and allows some flexibility: Doxygen Comments.
I am actually using Doxygen, so this extension is perfect for me, but even if you aren't, it still is really useful. The configuration is super straight forward and flexible (shown in the below picture). The extension options allow you to modify how the comments will look when auto-completed.
With this extension, the auto-indentation works perfectly now:
Upvotes: 1
Reputation: 167
I think you may have to use an extension for this feature. For example Auto Comment Blocks seems to do the job.
Upvotes: 0