Generalized EditorConfig properties
Each of the EditorConfig properties listed in this topic allow setting multiple similar properties at once.
For example, there are a number of rather granular properties that let you configure whether to use space before parenthesis in if
, while
, catch
, etc. If you do not need to configure each of these similar properties separately, you can use the corresponding Generalized property ([resharper_]space_after_keywords_in_control_flow_statements
in this case).
Braces layout style
Property names:
[resharper_]brace_style
Language-specific aliases:
[resharper_]csharp_brace_style
, [resharper_]protobuf_brace_style
, [resharper_]css_brace_style
, [resharper_]js_brace_style
, [resharper_]cpp_brace_style
Allows setting the following properties:
- Braces Layout - Type and namespace declaration (C#)
- Braces Layout - Method declaration (C#)
- Braces Layout - Anonymous method declaration (C#)
- Braces Layout - Property declaration (C#)
- Braces Layout - Accessor declaration (C#)
- Braces Layout - Block under "case" label (C#)
- Braces Layout - Array and object initializer (C#)
- Braces Layout - Other (C#)
- Braces Layout - Namespace declaration (C++)
- Braces Layout - Linkage specifications (C++)
- Braces Layout - Type declaration (C++)
- Braces Layout - Function declaration (C++)
- Braces Layout - Anonymous method declaration (C++)
- Braces Layout - Block under "case" label (C++)
- Braces Layout - Other statements and blocks (C++)
- Code Layout - Braces (Css)
- Braces Layout - Function (JavaScript)
- Braces Layout - Functions passed as parameters to other function calls (JavaScript)
- Braces Layout - Control statements (JavaScript)
- Indenting Options - Curly braces not in options (Protobuf)
- Indenting Options - Curly/pointy braces in aggregate values in options (Protobuf)
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Align similar code in columns
Property names:
[resharper_]int_align
Language-specific aliases:
[resharper_]csharp_int_align
Allows setting the following properties:
- Align Similar Code in Columns - Fields and constants (C#)
- Align Similar Code in Columns - Properties and events (C#)
- Align Similar Code in Columns - Simple methods, operators, delegates (C#)
- Align Similar Code in Columns - Multiline method signature (C#)
- Align Similar Code in Columns - Variables and local constants (C#)
- Align Similar Code in Columns - Other assignments and initializers (C#)
- Align Similar Code in Columns - Nested ternary operators (C#)
- Align Similar Code in Columns - Invocations of the same method (C#)
- Align Similar Code in Columns - Binary expressions (C#)
- Align Similar Code in Columns - End comments (C#)
- Align Similar Code in Columns - Simple switch sections (C#)
Possible values:
true | false
Keep existing code arrangements (single line/multi line)
Property names:
[resharper_]keep_existing_arrangement
Language-specific aliases:
[resharper_]csharp_keep_existing_arrangement
Allows setting the following properties:
- General - Keep existing line breaks (C#)
- Arrangement of Attributes - Keep existing arrangement of attributes (C#)
- Arrangement of Expression Bodied Members - Keep existing arrangement of expression bodied members (C#)
- Arrangement of Declaration Blocks - Keep existing arrangement of declaration blocks (C#)
- Arrangement of Embedded Statements - Keep existing arrangement of embedded statements (C#)
- Arrangement of Embedded Blocks - Keep existing arrangement of embedded blocks (C#)
- Arrangement of Initializers - Keep existing arrangement of initializers (C#)
Possible values:
true | false
Place simple blocks on single line
Property names:
[resharper_]place_simple_blocks_on_single_line
Language-specific aliases:
[resharper_]csharp_place_simple_blocks_on_single_line
Allows setting the following properties:
- Arrangement of Declaration Blocks - Place abstract/auto property/indexer/event declaration on single line (C#)
- Arrangement of Declaration Blocks - Place simple property/indexer/event declaration on single line (C#)
- Arrangement of Declaration Blocks - Place it on single line even when it has attributes on accessors (C#)
- Arrangement of Declaration Blocks - Place simple accessor on single line (C#)
- Arrangement of Declaration Blocks - Place simple method on single line (C#)
- Arrangement of Embedded Blocks - Place a block with a single simple statement on same line (C#)
- Arrangement of Embedded Blocks - Place simple anonymous method on single line (C#)
Possible values:
true | false
Place blocks from simple type members on single line
Property names:
[resharper_]place_simple_declaration_blocks_on_single_line
Language-specific aliases:
[resharper_]csharp_place_simple_declaration_blocks_on_single_line
Allows setting the following properties:
- Arrangement of Declaration Blocks - Place abstract/auto property/indexer/event declaration on single line (C#)
- Arrangement of Declaration Blocks - Place simple property/indexer/event declaration on single line (C#)
- Arrangement of Declaration Blocks - Place it on single line even when it has attributes on accessors (C#)
- Arrangement of Declaration Blocks - Place simple accessor on single line (C#)
- Arrangement of Declaration Blocks - Place simple method on single line (C#)
Possible values:
true | false
Place simple attribute on same line with owner
Property names:
[resharper_]place_attribute_on_same_line
Language-specific aliases:
[resharper_]csharp_place_attribute_on_same_line
Allows setting the following properties:
- Arrangement of Attributes - Place type attribute on same line (C#)
- Arrangement of Attributes - Place method attribute on same line (C#)
- Arrangement of Attributes - Place property/indexer/event attribute on same line (C#)
- Arrangement of Attributes - Place accessor attribute on same line (C#)
- Arrangement of Attributes - Place field attribute on same line (C#)
Possible values:
-
True
: Always -
always
: Always -
if_owner_is_single_line
: If owner is singleline -
False
: Never -
never
: Never
Space after comma
Property names:
[resharper_]space_after_comma
Language-specific aliases:
csharp_space_after_comma
, [resharper_]vb_space_after_comma
, [resharper_]css_space_after_comma
, [resharper_]js_space_after_comma
, [resharper_]cpp_space_after_comma
Allows setting the following properties:
- Around Comma and Semicolon - After comma (C#)
- In Declarations - After comma in declaration of multiple variables (C++)
- In Declarations - After comma in function parameters (C++)
- In Declarations - After comma in enum (C++)
- In Declarations - After comma in base clause (C++)
- In Declarations - After comma in template parameters (C++)
- In Declarations - After comma in template arguments (C++)
- In Expressions - After comma in function call and initialization (C++)
- In Expressions - After comma in uniform initialization braces (C++)
- Expression - After comma (Css)
- Comma - After comma (JavaScript)
- Other - After ',' (VB.NET)
Possible values:
true | false
Space around binary operators (+, ||, =, ...)
Property names:
[resharper_]space_around_binary_operator
Language-specific aliases:
[resharper_]csharp_space_around_binary_operator
, [resharper_]vb_space_around_binary_operator
, [resharper_]js_space_around_binary_operator
, [resharper_]cpp_space_around_binary_operator
Allows setting the following properties:
- Around Binary Operators - Assignment operators (=,+=,...) (C#)
- Around Binary Operators - Logical operators (&&,||) (C#)
- Around Binary Operators - Equality operators (==,!=) (C#)
- Around Binary Operators - Relational operators (<,>,<=,>=) (C#)
- Around Binary Operators - Bitwise operators (&,|,^) (C#)
- Around Binary Operators - Additive operators (+,-) (C#)
- Around Binary Operators - Multiplicative operators (*,/,%) (C#)
- Around Binary Operators - Shift operators (<<,>>) (C#)
- Around Binary Operators - Null coalescing operator (??) (C#)
- In Expressions - Around binary operator (C++)
- In Expressions - Around binary operator (JavaScript)
- Around Operations - Assignment operators (=,+=,...) (VB.NET)
- Around Operations - Relational operators (<,>,<=,>=) (VB.NET)
- Around Operations - Additive operators (+,-) (VB.NET)
- Around Operations - Multiplicative operators (*,/,...) (VB.NET)
- Around Operations - Shift operators (<<,>>) (VB.NET)
Possible values:
true | false
Space around member access operators (., ->, ...)
Property names:
[resharper_]space_around_member_access_operator
Language-specific aliases:
[resharper_]csharp_space_around_member_access_operator
, [resharper_]vb_space_around_member_access_operator
, [resharper_]js_space_around_member_access_operator
, [resharper_]cpp_space_around_member_access_operator
Allows setting the following properties:
Possible values:
true | false
Space before brackets
Property names:
[resharper_]space_before_open_square_brackets
Language-specific aliases:
csharp_space_before_open_square_brackets
, [resharper_]js_space_before_open_square_brackets
, [resharper_]cpp_space_before_open_square_brackets
Allows setting the following properties:
Possible values:
true | false
Space before parenthesis of control flow statements
Property names:
[resharper_]space_after_keywords_in_control_flow_statements
Language-specific aliases:
csharp_space_after_keywords_in_control_flow_statements
, [resharper_]js_space_after_keywords_in_control_flow_statements
, [resharper_]cpp_space_after_keywords_in_control_flow_statements
Allows setting the following properties:
- Before Parentheses in Statements - "if" parentheses (C#)
- Before Parentheses in Statements - "while" parentheses (C#)
- Before Parentheses in Statements - "catch" parentheses (C#)
- Before Parentheses in Statements - "switch" parentheses (C#)
- Before Parentheses in Statements - "for" parentheses (C#)
- Before Parentheses in Statements - "foreach" parentheses (C#)
- Before Parentheses in Statements - "using" parentheses (C#)
- Before Parentheses in Statements - "lock" parentheses (C#)
- Before Parentheses in Statements - "fixed" parentheses (C#)
- In Control Statements - Before parentheses (C++)
- In Control Statements - Before parentheses (JavaScript)
Possible values:
true | false
Space before comma
Property names:
[resharper_]space_before_comma
Language-specific aliases:
csharp_space_before_comma
, [resharper_]vb_space_before_comma
, [resharper_]css_space_before_comma
, [resharper_]js_space_before_comma
, [resharper_]cpp_space_before_comma
Allows setting the following properties:
- Around Comma and Semicolon - Before comma (C#)
- In Declarations - Before comma in declaration of multiple variables (C++)
- In Declarations - Before comma in function parameters (C++)
- In Declarations - Before comma in enum (C++)
- In Declarations - Before comma in base clause (C++)
- In Declarations - Before comma in template parameters (C++)
- In Declarations - Before comma in template arguments (C++)
- In Expressions - Before comma in function call and initialization (C++)
- In Expressions - Before comma in uniform initialization braces (C++)
- Expression - Before comma (Css)
- Comma - Before comma (JavaScript)
- Other - Before ',' (VB.NET)
Possible values:
true | false
Space before method call parenthesis
Property names:
[resharper_]space_between_method_call_name_and_opening_parenthesis
Language-specific aliases:
csharp_space_between_method_call_name_and_opening_parenthesis
, [resharper_]js_space_between_method_call_name_and_opening_parenthesis
, [resharper_]cpp_space_between_method_call_name_and_opening_parenthesis
Allows setting the following properties:
- Before Other Parentheses - Method call parentheses (C#)
- Before Other Parentheses - Method call empty parentheses (C#)
- In Expressions - Before parentheses in function call and initialization (C++)
- In Expressions - Before empty parentheses in function call and initialization (C++)
- In Function Invocations - Before parentheses (JavaScript)
- In Function Invocations - Before empty parentheses (JavaScript)
Possible values:
true | false
Space before method declaration parenthesis
Property names:
[resharper_]space_between_method_declaration_name_and_open_parenthesis
Language-specific aliases:
csharp_space_between_method_declaration_name_and_open_parenthesis
, [resharper_]js_space_between_method_declaration_name_and_open_parenthesis
, [resharper_]cpp_space_between_method_declaration_name_and_open_parenthesis
Allows setting the following properties:
- Before Other Parentheses - Method declaration parentheses (C#)
- Before Other Parentheses - Method declaration empty parentheses (C#)
- In Declarations - Before parentheses in function parameters (C++)
- In Function Declarations - Before parentheses (JavaScript)
- In Function Declarations - Before parentheses of anonymous method (JavaScript)
Possible values:
true | false
Space within brackets
Property names:
[resharper_]space_between_square_brackets
Language-specific aliases:
csharp_space_between_square_brackets
, [resharper_]js_space_between_square_brackets
, [resharper_]cpp_space_between_square_brackets
Allows setting the following properties:
- Around Array Brackets - Array access brackets (C#)
- Around Array Brackets - Within array rank brackets (C#)
- Attributes - Within attribute brackets (C#)
- In Expressions - Within array subscript brackets (C++)
- In Index Expressions - Within brackets (JavaScript)
- In Array Literals - Within brackets (JavaScript)
Possible values:
true | false
Space within parenthesis of control flow statements
Property names:
[resharper_]space_between_parentheses_of_control_flow_statements
Language-specific aliases:
[resharper_]csharp_space_between_parentheses_of_control_flow_statements
, [resharper_]js_space_between_parentheses_of_control_flow_statements
, [resharper_]cpp_space_between_parentheses_of_control_flow_statements
Allows setting the following properties:
- Within Parentheses in Statements - "if" parentheses (C#)
- Within Parentheses in Statements - "while" parentheses (C#)
- Within Parentheses in Statements - "catch" parentheses (C#)
- Within Parentheses in Statements - "switch" parentheses (C#)
- Within Parentheses in Statements - "for" parentheses (C#)
- Within Parentheses in Statements - "foreach" parentheses (C#)
- Within Parentheses in Statements - "using" parentheses (C#)
- Within Parentheses in Statements - "lock" parentheses (C#)
- Within Parentheses in Statements - "fixed" parentheses (C#)
- In Control Statements - Within parentheses (C++)
- In Control Statements - Within parentheses (JavaScript)
Possible values:
true | false