Make Simutrans speak your language.

[patch] Editorconfig

Started by ceeac, December 02, 2018, 07:56:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


This patch adds a simple .editorconfig file to tell text editors to use consistent spacing by default (if the editor supports Editorconfig).
This should prevent mixed tabs and spaces for developers who use spaces for indentation (like myself).


Thank you, I was not aware of that convention. But I am not sure if any developer here could profit from it.

And we never ever formally agree on a spacing at all. Although 4 is fine with me.

If one uses this, one should also enable trimming of whitespaces in all dat,cc,c,h and Makefiles (but not in txt and tab)

At least for MSVC I found these entries:


Updated patch:

  • Removed indent_size=4 to use the editor default value (except Makefile, .mk, .rc, .nsi and .nsh since those have clearly different indentation styles
  • Enabled trimming trailing whitespace for all files except .txt and .tab


I was not against 4, but I think we just never talked about.

Anyway, I will include it, even though I cannot test it (MSVC 2012 is too old).