Once upon a time, everyone was configuring their editors. They should because each editor was different configuration but each programming language or framework had different configuration needs. Fortunately nowadays EditorConfig solved this problem by unifying configuration.

EditorConfig has some configurable rules and editor extensions can use them to configure their configuration. In this post, I will explain how to use EditorConfig in VS Code editor effectively.

Let’s look for an extension for VS Code for EditorConfig support. Fortunately EditorConfig itself developed an extension for VS Code!

The EditorConfig Extension for VS Code

You can get the official EditorConfig extension for VS Code by searching with “EditorConfig” keyword in “Extensions” tab of VS Code. Or you can get it from this address: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

That is it, if you have an .editorconfig file with proper configuration within it, then you don’t need anything else other than installing the extension! Now, whenever you changed or saved a file, VS Code respects to the .editorconfig file for the configuration about indentation type and size, encoding, end-of-line character and trimming whitespace characters.