http://asawicki.info/ Programming, graphics, games, media, C++, Windows, Internet and more...
EditorConfig to the Rescue for Multiple Projects
I was once asked to participate in a project where coding standard required to use indentation of 3 spaces - different than what I do normally, when I use 4 spaces. I was searching Internet for answer whether Visual Studio supports per-project settings for this and I've found out that it doesn't, but came across this instead: EditorConfig.
This technology is so simple you can learn all about it in just few minutes, still very useful for cases like mine. You can basically create text file called
.editorconfig in root directory of your project and describe configuration for editors using a simple language. For example:
root = true
charset = utf-8
indent_style = space
indent_size = 3
Of course your text editor must support that. It turns out many of them support this standard natively. Editors I care about have plugins for that available. Unfortunately the one for jEdit doesn't seem to work (I've reported this issue), but the one for Visual Studio works perfectly. Now I could have per-project configuration for text editor, including character set, line ending type, and indentation type (tabs versus spaces and the number of spaces).
|Yeah, EditorConfig is great for public/shared projects. What is more, VS15 supports this natively (!) and extends its basic capabilities (at least for C# - https://blogs.msdn.microsoft.com/dotnet/2016/12/15/code-style-configuration-in-the-vs2017-rc-update/).|