在编辑器配置中的同一行设置属性格式

Vik*_*kto 5 c# editorconfig

编辑器配置上是否有任何选项可以格式化属性,例如“Example1”而不是“Example2”?

下面的例子是C#。

Gur*_*ron 6

据我所知,“vanilla”.editorconfig 没有这样的选项,但是如果您使用 Rider/Resharper,那么有很多选项可以设置 attribute\xef\xbb\xbf 的排列。例如,您可以使用以下内容:

\n
[*.cs]\nplace_attribute_on_same_line = false\n
Run Code Online (Sandbox Code Playgroud)\n

或者针对特定领域:

\n
[*.cs]\ncsharp_place_field_attribute_on_same_line = false\n
Run Code Online (Sandbox Code Playgroud)\n