The EditorConfig Project helps developers define and maintain consistent coding styles between different editors and IDEs. Visual Studio 2017 natively supports .editorconfig files, but it doesn't give language support for editing those files. This extension provides that For Visual Studio version 2010 to 2015, get the EditorConfig extension instead. See the change log for changes and road map. Features
Create .editorconfig filesTo make it really easy to add a .editorconfig file, you can now right-click any folder, project, solution folder and hit Add -> .editorconfig File Syntax highlightingFull colorization of the full .editorconfig syntax. C# and .NET style analyzersVisual Studio 2017 lets you add C# and .NET specific rules to the .editorconfig file. In addition to enabling various rules, a severity is also added to control how Visual Studio is going to handle these rules. Each severity is clearly marked by an icon to make it easy to identify. IntellisenseThe extension provides Intellisense for both keywords and values. Code snippetsVarious code snippets have been added to make it easier to work with .editorconfig files. To insert a snippet, right-click inside the editor or hit Ctrl+K,Ctrl+X. This will show a list of available snippets to insert. ValidationError squiggles are shown for invalid values. Properties that are being overridden by a duplicate property in the same section is easy to identify. If a parent document contains the exact same property and value in a section with the same globbing pattern, a suggestion shows up to remove it. See the complete list of error codes. To suppress any error in the .editorconfig document, use the light bulb feature: That will add a special comment at the top of the file to let the validator know what error messages to suppress. Another way to suppress the error is by right-clicking the error in the Error List. Hover tooltipsHover the mouse over any keyword to see a full description. Light bulbsSorting properties and deleting sections is easy with the commands being shown as light bulbs in the editor margin. Code formattingTyping Navigational drop downsDropdown menus at the top of the editor makes it easy to navigate the document. Inheritance visualizerA project can have multiple .editorconfig files and the rules in each cascades from the top-most and down. It is based on folder structure. The inheritance visualizer is located at the bottom right corner of the editor window and makes it easy to see this relationship. You can navigate to the immediate parent document by hitting F12. You can change the shortcut under Tools -> Options -> Environment -> Keyboard and find the command called EditorConfig.NavigateToParent. Note, the inheritance visualizer is only visible when the current file isn't the root of the hierarchys or by specifying the SettingsChange the behavior of the editor from Tools -> Options or simply by right-clicking in the editor. ContributeCheck out the contribution guidelines if you want to contribute to this project. For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project. License |