Skip to content

Instantly share code, notes, and snippets.

@kuhlenh
Last active October 25, 2016 04:10
Show Gist options
  • Save kuhlenh/b8258bcf509d4716fde47214bcef085a to your computer and use it in GitHub Desktop.
Save kuhlenh/b8258bcf509d4716fde47214bcef085a to your computer and use it in GitHub Desktop.
editorconfig style names proposal

Principles

  1. avoid "verbs" (such that the root of the "style" is first)
  2. sound like a robot
  3. less rules, more options when possible
  4. shorter the better

General Settings

inclusion editorconfig name possible values
[ ] visualstudio_virtual_whitespace true , false
[ ] visualstudio_wordwrap true , false
[ ] visualstudio_line_numbers true , false
[ ] visualstudio_automatic_brace_completion true , false
[ ] visualstudio_cut_copy_commands_to_blank_lines true , false

Completion List Options

inclusion editorconfig name possible values
[ ] visualstudio_completion_list_after_character typed, deleted, both, none
[ ] visualstudio_matching_portions_of_completion_list_items_highlighted true , false
[ ] visualstudio_completion_item_filters true , false
[ ] visualstudio_completion_list_include_snippets true, false, hybrid
[ ] visualstudio_completion_list_enter_key_newline true, false, hybrid

Tabs

inclusion editorconfig name possible values
[X] csharp_indent_style none , block , smart

Advanced

inclusion editorconfig name possible values
[X] csharp_system_directives_first_in_sort true , false

General Formatting Options

inclusion editorconfig name possible values
[ ] visualstudio_automatically_format_on semicolon, brace, paste, all, none (or separate with ':')

Indentation Options

inclusion editorconfig name possible values
[X] csharp_indent_block_contents true , false
[X] csharp_indent_braces true , false
[X] csharp_indent_case_contents true , false
[X] csharp_indent_case_labels true , false
[X] csharp_label_indentation leftmost, one_less_than_current, none

New Line Options

inclusion editorconfig name possible values
[X] csharp_open_brace_on_new_line_for types, methods, properties, indexers, events, event_accessors, anonymous_methods, control_blocks, anonymous_types, object_collections, array_initializers, lambdas, local_functions, all, none (or separate with ':')
[X] csharp_else_on_new_line true , false
[X] csharp_catch_on_new_line true , false
[X] csharp_finally_on_new_line true , false
[X] csharp_members_in_object_initializers_on_new_line true , false
[X] csharp_members_in_anonymous_types_on_new_line true , false
[X] csharp_query_expression_clauses_on_new_line true , false

Spacing Options

inclusion editorconfig name possible values
[X] csharp_space_after_cast true , false
[X] csharp_spaces_in_declaration_statements true , false
[X] csharp_space_before_open_square_bracket true , false
[X] csharp_space_within_empty_square_bracket true , false
[X] csharp_space_within_square_bracket true , false
[X] csharp_space_after_colon_for_base_or_interface_in_type_declaration true , false
[X] csharp_space_after_comma true , false
[X] csharp_space_after_dot true , false
[X] csharp_space_after_semicolon_in_for_statement true , false
[X] csharp_space_before_colon_for_base_or_interface_in_type_declaration true , false
[X] csharp_space_before_comma true , false
[X] csharp_space_before_dot true , false
[X] csharp_space_before_semicolon_in_for_statement true , false
[X] csharp_space_between_method_declaration_name_and_open_parenthesis true , false
[X] csharp_space_within_method_declaration_parameter_list_parenthesis true , false
[X] csharp_space_within_method_declaration_empty_parameter_list_parentheses true , false
[X] csharp_space_between_method_call_name_and_opening_parenthesis true , false
[X] csharp_space_within_method_call_parameter_list_parenthesis true , false
[X] csharp_space_within_method_call_empty_parameter_list_parentheses true , false
[X] csharp_space_after_keywords_in_control_flow_statements true , false
[X] csharp_space_within_parentheses expressions, type_casts, control_flow_statements
[X] csharp_spacing_for_operators none, before_and_after, ignore

Wrapping Options

inclusion editorconfig name possible values
[X] csharp_block_on_single_line true , false
[X] csharp_statements_and_member_declarations_on_same_line true , false

Code Style Options

inclusion editorconfig name possible values
csharp_this_qualification_for_field ...
csharp_this_qualification_for_property ...
csharp_this_qualification_for_method ...
csharp_this_qualification_for_event ...
visualbasic_me_qualification_for_* ...
csharp_var_for_locals ...
csharp_var_for_built_in_type ...
csharp_var_for_when_type_apparent ...
csharp_var_for_elsewhere ...
csharp_predefined_type_for_locals_parameter_members ...
chsarp_predefined_type_for_member_access ...

CUT THESE:

inclusion editorconfig name possible values
[ ] visualstudio_single_click_url_navigation true , false
[ ] visualstudio_navigation_bar true , false
[ ] csharp_suggest_usings_for_types_in_reference_assemblies true , false
[ ] csharp_suggest_usings_for_types_in_nuget_packages true , false
[ ] visualstudio_highlight_reference_to_symbol_under_cursor true , false
[ ] visualstudio_highlight_related_keywords_under_cursor true , false
[ ] visualstudio_enter_outlining_mode_when_files_open true , false
[ ] visualstudio_show_procedure_line_separators true , false
[ ] all scroll bar related things
@kuhlenh
Copy link
Author

kuhlenh commented Oct 25, 2016

@CyrusNajmabadi would like to point out that it is going to be very difficult to read this without a sense of "categories" or "groups" in the text file beyond file-extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment