TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

EditorConfig – file format for defining coding styles and text editor plugins

164 pointsby s_chaudharyalmost 8 years ago

10 comments

serkanyersenalmost 8 years ago
People comparing EditorConfig to eslint or prettier does not really understand it&#x27;s purpose.<p>yes they have intersecting features, but EditorConfig&#x27;s main feature is that it lets you set file type specific whitespace rules automatically, across almost all editors.<p>- Most editors will have a global whitespace rule and you have to use that same rule for every file.<p>- Some editors can be configured to have different rules per file type but then it can&#x27;t be done per project. So every project has to use the same rules.<p>- Some editors will let you configure all of these per project, but you have to save this project-settings file somewhere. Editor specific code is no good in the repo, so you need to maintain&#x2F;backup it yourself.<p>EditorConfig solves all of these issues for me.
vorticoalmost 8 years ago
Before clicking on the link, I thought &quot;Oh, just another attempt at standardizing editor preferences from a file in a repo.&quot; But looking at their list of editors which natively support EditorConfig and the list of plugins for editors which don&#x27;t, this is far better support than I imagined. This is it! Problem solved.
评论 #14818476 未加载
Brajeshwaralmost 8 years ago
EditorConfig is awesome, especially for a distributed remote team. I&#x27;ve standardized everyone whom I ever worked with few initial project settings and EditorConfig is such one must-do item. Been using it (I think) for the past 5 years or so.
评论 #14819777 未加载
qntmfredalmost 8 years ago
I made this a standard for all my engineers years ago. anything I can do to automate consistency and &quot;correctness&quot; in coding style and let my team focus on doing the real work
majewskyalmost 8 years ago
Looks like 99% of this is covered by my editor being configured to autodetect existing indentation, and adjust itself accordingly: <a href="https:&#x2F;&#x2F;github.com&#x2F;ciaranm&#x2F;detectindent" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ciaranm&#x2F;detectindent</a>
评论 #14819499 未加载
评论 #14819502 未加载
评论 #14819440 未加载
duncan_baynealmost 8 years ago
I&#x27;ve evangelised this tool on every team I&#x27;ve worked with for years. It eliminates _so_ many forms of conflict and bikeshedding. (Plus I have contributed in a trivial way to the Emacs plugin; they very happily accept PRs).
lytedevalmost 8 years ago
At least in the JavaScript world, this was a lovely thing to have. Now we have linters which are even better! Still nice to include this so that all collaborators don&#x27;t need to modify their editors to jump in!
评论 #14816985 未加载
评论 #14817713 未加载
评论 #14818852 未加载
donatjalmost 8 years ago
I prefer tabs to spaces, not here to argue, and editorconfig is read by GitHub and let&#x27;s me change tabs to display as 4 spaces instead of eight. A major win. Also allows me to default their editor to tabs.
评论 #14819765 未加载
andreineculaualmost 8 years ago
The companion would be eclint in order to lint as part of a git hook or CI test run<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jedmao&#x2F;eclint" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jedmao&#x2F;eclint</a>
mrkgnaoalmost 8 years ago
&quot;LSP for indentation&quot; :)