EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles.
You can find the detail information from here
Intall the pulgin for you text editor. You can find detail at http://editorconfig.org/. You text editor will automaticly apply the config for formatting the code you wroten.
Simply copy and paste this .editorconfig to your project root folder. That is all :)