<story><title>EditorConfig: Consistent coding styles across various editors and IDEs</title><url>https://editorconfig.org/</url></story><parent_chain><item><author>skoskie</author><text>Ok, help me understand this. I’m on #TeamTab which puts me at odds with most coding standards. I usually work solo, so I don’t care, but every time I do let someone else edit a file, the commit shows every line has changed because their editor converts my indents.&lt;p&gt;Are you saying there’s a tool that will let me work with (superior) tabs but have standards compliant commits?&lt;p&gt;I’ve tried doing this in my .gitconfig with limited success. It didn’t work consistently.</text></item><item><author>petetnt</author><text>These days I vastly prefer autoformatters, only run at precommit stage myself. Instead of having to adapt to different styles everytime and getting distracted by stylistic changes mid-coding (eg. on save), I can just rely that the styles are eventually consistent and code ahead. It takes some time getting used to, but it’s super refreshing.</text></item></parent_chain><comment><author>yoodenvranx</author><text>The thing with ideal auto-formatters is that there is no discussion about tabs vs spaces anymore!&lt;p&gt;In a perfect world each language has exactly one (non-configurable) formatter and this solves all the formatting discussions.&lt;p&gt;For JS I use prettier and altough I am not 100% happy with some of the formatting choices I _love_ it because I can focus on code and not have flamewars about tabs vs spaces with my co-workers. prettier ends all style discussions. And code reviews are much nicer because people concentrate on checking the code, not the formatting.</text></comment>
<story><title>EditorConfig: Consistent coding styles across various editors and IDEs</title><url>https://editorconfig.org/</url></story><parent_chain><item><author>skoskie</author><text>Ok, help me understand this. I’m on #TeamTab which puts me at odds with most coding standards. I usually work solo, so I don’t care, but every time I do let someone else edit a file, the commit shows every line has changed because their editor converts my indents.&lt;p&gt;Are you saying there’s a tool that will let me work with (superior) tabs but have standards compliant commits?&lt;p&gt;I’ve tried doing this in my .gitconfig with limited success. It didn’t work consistently.</text></item><item><author>petetnt</author><text>These days I vastly prefer autoformatters, only run at precommit stage myself. Instead of having to adapt to different styles everytime and getting distracted by stylistic changes mid-coding (eg. on save), I can just rely that the styles are eventually consistent and code ahead. It takes some time getting used to, but it’s super refreshing.</text></item></parent_chain><comment><author>chrisweekly</author><text>The real-world choice is not (tabs) || (spaces), it&amp;#x27;s (tabs &amp;amp;&amp;amp; spaces) || (spaces). Which is why spaces is the objectively superior choice.</text></comment>