editorconfig

.editorconfig in shared Git repository

两盒软妹~` 提交于 2021-02-08 18:05:56
问题 I have prepared my .editorconfig file which I want to use on multiple Git repositories. Each repository holds a Visual Studio solution (C#). My first thought was to put the .editorconfig file in its own repository and then include it in all "solution repositories" as submodule. The problem however: The submodule will be in a subfolder. The contained .editorconfig will thus not be applied to the whole project/solution (but only to the subfolder and its children). It seems to me that I cannot

.editorconfig in shared Git repository

时间秒杀一切 提交于 2021-02-08 17:57:15
问题 I have prepared my .editorconfig file which I want to use on multiple Git repositories. Each repository holds a Visual Studio solution (C#). My first thought was to put the .editorconfig file in its own repository and then include it in all "solution repositories" as submodule. The problem however: The submodule will be in a subfolder. The contained .editorconfig will thus not be applied to the whole project/solution (but only to the subfolder and its children). It seems to me that I cannot

editorconfig - cannot get naming conventions to work

…衆ロ難τιáo~ 提交于 2021-02-06 09:19:47
问题 I created the following setup for C#. The idea is to have everything that's private named in camelCase and everything public and protected in UpperCase. Here's my .editorconfig setup (simplified): [*.{cs,cshtml}] # styles dotnet_naming_style.camel_case.capitalization = camel_case dotnet_naming_style.first_upper.capitalization = first_word_upper # symbols dotnet_naming_symbols.private_symbols.applicable_accessibilities = private dotnet_naming_symbols.public_symbols.applicable_accessibilities =

editorconfig - cannot get naming conventions to work

孤者浪人 提交于 2021-02-06 09:19:05
问题 I created the following setup for C#. The idea is to have everything that's private named in camelCase and everything public and protected in UpperCase. Here's my .editorconfig setup (simplified): [*.{cs,cshtml}] # styles dotnet_naming_style.camel_case.capitalization = camel_case dotnet_naming_style.first_upper.capitalization = first_word_upper # symbols dotnet_naming_symbols.private_symbols.applicable_accessibilities = private dotnet_naming_symbols.public_symbols.applicable_accessibilities =

不起眼的 .editorconfig

流过昼夜 提交于 2020-04-06 22:02:35
还是在看别人 github 上项目的时候,看到好多项目目录下都会有个 .editorconfig 文件,起初看里面内容有个 md 的字符,还以为就 markdown 文件的配置来,后来有一次在 Webstorm 里配置一个 tab 键占几个空格时又发现了这个配置文件,这次细细查询了一番,感觉不起眼的 .editorconfig 还是颇有用处的。 一、为什么要用 .editorconfig ? 在多人合作的项目中,每个人的开发习惯是不同的。以缩进来说,有的人习惯使用 space 键来进行缩进,有的人喜欢用 tab 键,有的人喜欢设置缩进为 4 个空格,有的人喜欢设置为 2 个空格。这样产生的后果就是每个人修改后的代码在格式上总是不统一的,那么提交到 git 上就会代码风格不一致,变得丑陋无比。 在此之前,我一直使用 Eslint 做代码 lint,那么为什么还要使用 .editorconfig 呢?细细想了下,应该有两个方面吧。 Eslint 确实包含 .editorconfig 中的一些属性,如缩进等,但并不全部包含,如 .editorconfig 中的 insert_final_newline 属性 Eslint 就没有。Eslint 更偏向于对语法的提示,如定义了一个变量但是没有使用时应该给予提醒。而 .editorconfig 更偏向于代码风格,如缩进等。 Eslint

.editorconfig is not working in Visual Studio 2017 when my sotution is not in my C: drive?

断了今生、忘了曾经 提交于 2019-12-22 07:59:27
问题 I have added a .editorconfig file at my solution base folder but Visual Studio 2017 keeps using its settings, but this happenes just when the solution folder is not in the C: drive (if the solution folder is in the C: drive .editorconfig file is working perfectly). I have also tried to add .editorconfig file to each project of the solution but still the same problem. Note that I have root = true in my .editorconfig file. I am using the following version of Visual Studio: Microsoft Visual

Editor config - how to align the code

你说的曾经没有我的故事 提交于 2019-12-11 08:49:23
问题 I'm using VS Code and for formating my code I use a formatter CTRL + SHIFT + I . It works fine, but I would like to be able to format my code to be align in this way: before: export const apiConfig = { protocol: 'https', url: 'www.example.com', timeoutSec: 15 } after: export const apiConfig = { protocol: 'https', url: 'www.example.com', timeoutSec: 15 } Any way to set it up? Any specific setting for .editorconfig? 回答1: What you are asking for is impossible to easily achieve in one go within

Export Visual Studio's 'Code Style settings' as .editorconfig

橙三吉。 提交于 2019-12-06 17:40:36
问题 Our team works with Visual Studio 2017 Professional. I've been trying to unify the Code Style across the team and apparently the industry standard right now is to use .editorconfig files. Even Visual Studio in it's settings windows suggests to use that configuration file and links to a useful page on how to write an editorconfig file. but I don't want to write all the settings that I already have configured in VS by hand. I would like a tool that exports those settings as a .editorconfig file

.editorconfig is not working in Visual Studio 2017 when my sotution is not in my C: drive?

拈花ヽ惹草 提交于 2019-12-05 18:06:40
I have added a .editorconfig file at my solution base folder but Visual Studio 2017 keeps using its settings, but this happenes just when the solution folder is not in the C: drive (if the solution folder is in the C: drive .editorconfig file is working perfectly). I have also tried to add .editorconfig file to each project of the solution but still the same problem. Note that I have root = true in my .editorconfig file. I am using the following version of Visual Studio: Microsoft Visual Studio Community 2017 version 15.2 (26430.06) I somehow figured out how to solve this problem. My solution

Export Visual Studio's 'Code Style settings' as .editorconfig

南笙酒味 提交于 2019-12-04 23:27:55
Our team works with Visual Studio 2017 Professional. I've been trying to unify the Code Style across the team and apparently the industry standard right now is to use .editorconfig files. Even Visual Studio in it's settings windows suggests to use that configuration file and links to a useful page on how to write an editorconfig file. but I don't want to write all the settings that I already have configured in VS by hand. I would like a tool that exports those settings as a .editorconfig file to distribute them. I haven't been able to find any tool to do just that so I thought on righting it