EditorConfig 以纯原生无需任何插件支持 EditorConfig 代码风格配置的编辑器:

Visual Studio 2017 开始添加了对 EditorConfig 的原生支持。Visual Studio 一旦检测到 .editorconfig 文件的存在,格式约定就会自动生效。

Visual Studio 中 .NET 相关语言(C# VB)的 EditorConfig 属性,可以参考 .NET coding convention settings For EditorConfig

设置EditorConfig所需插件: EditorConfig Language Service 和 Visual Studio IntelliCode

EditorConfig Language Service 生成的 .editorconfig 文件是空的。

IntelliCode 一经添加便提供了丰富的 C# 语言约定的属性设置。不过,IntelliCode 提供的设置多少取决于你目前解决方案中的项目类型。

如果你使用 EditorConfig Language Service 生成了 .editorconfig 文件,则可以继续点击小灯泡生成按照微软约定的编程规范。

C#简单配置:

[*]
end_of_line = crlf
charset = utf-
indent_size =
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space [*.cs]
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = flush_left
csharp_indent_switch_labels = true
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
csharp_prefer_braces = true:silent
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_around_binary_operators = before_and_after
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_var_elsewhere = true:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent

编程风格统一配置EditorConfig的更多相关文章

  1. 浅谈前端JavaScript编程风格

    前言 多家公司和组织已经公开了它们的风格规范,详细可參阅jscs.info,以下的内容主要參考了Airbnb的JavaScript风格规范.当然还有google的编程建议等编程风格 本章探讨怎样使用E ...

  2. 《Essential C++》读书笔记 之 基于对象编程风格

    <Essential C++>读书笔记 之 基于对象编程风格 2014-07-13 4.1 如何实现一个class 4.2 什么是Constructors(构造函数)和Destructor ...

  3. 【Spring】SpringMVC之REST编程风格

    REST架构是一个抽象的概念,目前主要是基于HTTP协议实现,其目的是为了提高系统的可伸缩性.降低应用之间的耦合度.便于架构分布式处理程序.当使用多种语言进行开发的时候,每一种语言对URL的处理不同, ...

  4. [转]ECMAScript 6 入门 -编程风格

    本文转自:http://es6.ruanyifeng.com/#docs/style 编程风格 块级作用域 字符串 解构赋值 对象 数组 函数 Map结构 Class 模块 ESLint的使用 本章探 ...

  5. ES6学习笔记(二十一)编程风格

    本章探讨如何将 ES6 的新语法,运用到编码实践之中,与传统的 JavaScript 语法结合在一起,写出合理的.易于阅读和维护的代码. 1.块级作用域 (1)let 取代 var ES6 提出了两个 ...

  6. 个人c语言编程风格总结

    总结一下我个人的编程风格及这样做的原因吧,其实是为了给实验室写一个统一的C语言编程规范才写的.首先声明,我下面提到的编程规范,是自己给自己定的,不是c语言里面规定的. 一件事情,做成和做好中间可能隔了 ...

  7. Google Java编程风格指南

    出处:http://hawstein.com/posts/google-java-style.html 声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Creative Comm ...

  8. Google Java编程风格指南中文版

    作者:Hawstein出处:http://hawstein.com/posts/google-java-style.html声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Cre ...

  9. Java学习笔记(六)——google java编程风格指南(下)

    [前面的话] 年后开始正式上班,计划着想做很多事情,但是总会有这样那样的打扰,不知道是自己要求太高还是自我的奋斗意识不够?接下来好好加油.好好学学技术,好好学习英语,好好学习做点自己喜欢的事情,趁着自 ...

随机推荐

  1. 前端文章索引:HTML+CSS+JS

    1 HTML 1.1 HTML5 HTML5 – 1.基础 HTML5 – 2.新元素 HTML5 – 3.加强版ol HTML5 – 4.canvas 2 CSS 2.1 CSS3 CSS3–1.c ...

  2. Windows上的那些效率神器,让你快到飞起

    转自:https://zhuanlan.zhihu.com/p/41771626 本文为Windows上有哪些让你效率倍增的软件和小技巧系列第二篇,上一篇请点击蓝字查看:打造高逼格PC,让你的电脑好用 ...

  3. 用GEOquery从GEO数据库下载数据--转载

    https://www.plob.org/article/9969.html Gene Expression Omnibus database (GEO)是由NCBI负责维护的一个数据库,设计初衷是为 ...

  4. java 欢迎页 主页 设置为servlet的方法

    [参考]Java Web 设置默认首页 [参考]设置servlet或action作为欢迎页面 1. 使用HTML<meta>标签跳转至servlet  <META HTTP-EQUI ...

  5. JavaScript 图片与Base64数据互相转换脚本

    JavaScript 图片与Base64数据互相转换脚本 注: 转换过程中注意跨域问题.测试页是否支持相关标签创建.dom结构. 方法一:非Html 5使用FileReader 使用XMLHttpRe ...

  6. (原)关于使用zoompad滤镜生成一个转场效果

    之前在 http://bbs.chinaffmpeg.com/forum.php?mod=viewthread&tid=1294&extra=page%3D1 上分享过一个转场效果,今 ...

  7. Elasticsearch学习之集群常见状况处理(干货)

    1. 集群健康状况处理 当集群处于yellow或者red状态的时候,整体处理步骤如下: (1) 首先查看集群状态 localhost:/_cluster/health?pretty { "c ...

  8. oracle 导出,导入表

    导出 exp DZQZ/DZQZ@orcl file=D:/DZQZ.dmp log=D:/DZQZ.log 导入 imp DZQZ/DZQZ@orcl file=D:\电子取证\DZQZ.dmp f ...

  9. CSS选择子简明参考

    Type Selector Example h1 { } Description Selects an HTML tag/element. Universal selector Example * { ...

  10. OCR(Optical Character Recognition)算法总结

    https://zhuanlan.zhihu.com/p/84815144 最全OCR资料汇总,awesome-OCR