Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added an .editorconfig file #751
This allows most IDEs and editors (with the proper plugin) to automatically use the correct identation and line endings.
In short, you'll never ever have to worry about tabs or line breaks in your code again. In additon, this won't have any effect on your other files or projects, who'll continue to use your own global or custom settings.
There are plugins available for Microsoft Visual Studio, Notepad++, gedit, vim, and many other popular editors and IDEs.
More information can be found on http://www.editorconfig.org/.
I'm just not sure whether this should be handled differently based on extensions. Are there any files where tabs are preferred?
Having a look at restricting it at specific paths. There's no harm for those not using it, so should just get it configured properly.
@eXpl0it3r End-of-line style is already enforced by git, so people are able to use the line ending they prefer. Wouldn't try to enforce that here as well as it might screw up some editors.
Forgot to comment, but I've looked into restricting it to specific paths, which kinda works, but considering it won't change unedited files anyway, this seems to make the file/rules unnecessary complex.
Therefore I'd keep it as-is and only add exceptions in case any issues arrise (like some native makefile which would need tabs).
Ah, no! You misunderstood me (and I made a wrong assumption myself).
I basically thought of a situation where the local git repository works with Windows style line endings, which would be converted once committing changes (therefore enforced and unified by Git). If you'd force EditorConfig to replace line endings as well, you might essentially change line endings several time unintentionally (Unix -> Windows -> Unix).
However, I've just seen that SFML's
Going to update the PR. Keep in mind that these changes won't be applied to all files despite the filter being