Automatic indentation of arguments list on multiple lines in Visual Studio

前端 未结 2 1973
一个人的身影
一个人的身影 2021-02-20 02:16

When the list of arguments to a method grows to the point where they do not fit comfortably on one line, I like to format code such that each argument is on a separate line (fol

2条回答
  •  遥遥无期
    2021-02-20 03:15

    For anyone searching this problem for later versions, in visual studio 2017 I found an option to do this. (not sure if it is available in other versions) Under tools->options->Text editor->C/C++->Formatting->Indentation->"Within parentheses, align new lines when I type them"
    Choose the option "Align contents to opening parentheses.

提交回复
热议问题