Editorconfig

In order to assure everyone on our team uses the same critical editor settings, like spaces versus tabs, lines endings, and more.

A common war on any dev team is editor configurations and stylistics choices like tabs versus spaces. For solving this issue there is now a handy way to maintain consistency.

In order to achieve this, you can use editor config. Editorconfig is really easy to use, you basically only need to create a file called. editorconfig and place it in the root of your project, you can specify how your editor handle common settings like tabs versus spaces, indent size, line feeds, char sets, and trailing white space.

The great thing about editorconfig is that your team doesn’t have to use the same editor.

Editorconfig have support for most popular editors, for new editors you can add a plugin to make it work on your editor.

So this is how this work:

You create a file called. editorconfig and place it in the root of your project.

I’ll demonstrate this using visual studio code.

First add .editorconfig.

In order for this to work visual studio code requires a plugin which you can install as a regular vscode extension.

At this point vs code will need to be restarted, when restarted now editorconfig will enforce your rules in any future file you create.

LEAVE A REPLY

Please enter your comment!
Please enter your name here