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
- Place simple blocks on single line
- Space after comma
- Space around binary operators (+, ||, =, ...)
- Space around member access operators (., ->, ...)
- Space before brackets
- Space before parenthesis of control flow statements
- Space before comma
- Space before method call parenthesis
- Space before method declaration parenthesis
- Space within brackets
- Space within parenthesis of control flow statements
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 - Type declaration (C++)
- Braces Layout - Function 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)
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:
- Other - Place abstract/auto property/indexer/event declaration on single line (C#)
- Other - Place simple property/indexer/event declaration on single line (C#)
- Other - Place it on single line even when it has attributes on accessors (C#)
- Other - Place simple accessor on single line (C#)
- Other - Place simple method on single line (C#)
- Other - Place simple anonymous method on single line (C#)
Possible values:
true | false
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:
- Other - 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 template parameters (C++)
- In declarations - After comma in template arguments (C++)
- In expressions - After comma in function call and initialization (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:
- Around Binary Operators - Unsafe arrow operator (->) (C#)
- Other - Around dot (C#)
- In expressions - Around dot and '->' (C++)
- In expressions - Around dot (JavaScript)
- Other - Around '.' (VB.NET)
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:
- Before Parentheses - Array access brackets (C#)
- Other - Before array rank brackets (C#)
- In expressions - Before array subscript brackets (C++)
- In index expressions - Before brackets (JavaScript)
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 - "if" parentheses (C#)
- Before Parentheses - "while" parentheses (C#)
- Before Parentheses - "catch" parentheses (C#)
- Before Parentheses - "switch" parentheses (C#)
- Before Parentheses - "for" parentheses (C#)
- Before Parentheses - "foreach" parentheses (C#)
- Before Parentheses - "using" parentheses (C#)
- Before Parentheses - "lock" parentheses (C#)
- Before Parentheses - "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:
- Other - 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 template parameters (C++)
- In declarations - Before comma in template arguments (C++)
- In expressions - Before comma in function call and initialization (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 Parentheses - Method call parentheses (C#)
- Before 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 Parentheses - Method declaration parentheses (C#)
- Before 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:
- Within Parentheses - Array access brackets (C#)
- Other - Within attribute brackets (C#)
- Other - Within array rank brackets (C#)
- In expressions - Within array subscript brackets (C++)
- In index expressions - 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 - "if" parentheses (C#)
- Within Parentheses - "while" parentheses (C#)
- Within Parentheses - "catch" parentheses (C#)
- Within Parentheses - "switch" parentheses (C#)
- Within Parentheses - "for" parentheses (C#)
- Within Parentheses - "foreach" parentheses (C#)
- Within Parentheses - "using" parentheses (C#)
- Within Parentheses - "lock" parentheses (C#)
- Within Parentheses - "fixed" parentheses (C#)
- In control statements - Within parentheses (C++)
- In control statements - Within parentheses (JavaScript)
Possible values:
true | false