EditorConfig is a clever idea: a simple text file you can put anywhere in your code source that automatically changes settings in your favorite text editor.
For example, let’s say someone decided one project had to use space indentation (for Python?) even though everybody usually uses tabs. With EditorConfig, you can easily declare this setting in an .editorconfig
file in the root of the project…
|
…or you could put this file in any folder in your project, and the editor will automatically pick it up. Then, you can easily check this file in to your source control system. Anyone who checks out your project — and uses a EditorConfig-capable editor — will automatically inherit the recommended editor settings.
We thought this was pretty cool, and so did our users, so we went ahead and built an EditorConfig plug-in for Coda 2.5. It currently supports everything except for the text encoding setting.
If that install link didn’t work, or you don’t want to install it right now, you can browse our plug-ins here.
When you’re ready, read up on the file format here. We hope you enjoy it!
Benji Greig
2/17/2015 7:01 PMBloody fantastic. Thank you lovely people of Panic. I’m now an equal citizen in my repos with my other programming brethren/sistren.
Mayte Eme
2/17/2015 7:32 PMBrilliant!
Ben
2/17/2015 10:14 PMIt doesn’t seem to honor the `trim_trailing_whitespace = true` directive…
Bob Rockefeller
2/18/2015 5:49 AMVery nice! This is a feature I’ve wanted in Coda for some time and it provides lots of flexibility for those writing in different “languages” that often want different indentation. I like Tabs:3 for PHP and Spaces:2 for YAML, for example.
Jules
2/18/2015 7:30 AMCan this automatically convert four spaces to tabs when a file is opened?
Will
2/18/2015 8:06 AM@jules No it cant, it simply sets the editors current values.
Will
2/18/2015 3:38 PM@Ben Turns out I misunderstood what that directive was. :) I have added support for trimming white space, just update and you’ll be all set.
Martin
2/19/2015 10:09 PMWhat’s new/updated in Plugin Version 1.0.1?
Josh
2/20/2015 1:52 PMYAAAAAAAAY!!!
Benji Greig
3/15/2015 7:46 PMNoticed that because of the way the plugin works it seems to mess with the undo history. Makes it very hard to step back after saving.
Errol
3/16/2015 9:48 AMHOW DID I MISS THIS?
So glad I happened upon the blog today…
Dale
5/1/2016 2:40 PMIs there a possibility of getting this to work with Sites? If not, is there a default local .editorconfig that is loaded when one is not found?