7 ms·
EditorConfig
- michaelmior 12y agoEditorConfig is excellent. Straightforward to write a configuration file and pretty great editor support. I've only ever used the Vim plugin, but it works seamlessly such that I don't even notice.
- kolev 12y agoI've been using this for at least a couple of years and was expecting it to develop further (offer more common settings for editors) and to gain native support as, for example, the Sublime Text plugin loads the file using default tab size, then EditorConfig plugin kicks in and changes tab size to 4, let's say, which causes a full redraw and that always annoys me.
- th 12y agoNative support is the ultimate goal. WebStorm 9 will have EditorConfig support built-in (as noted here: https://www.jetbrains.com/webstorm/nextversion/ https://www.jetbrains.com/webstorm/nextversion/).
- kolev 12y agoGreat! Let's keep spreading awareness so that this becomes a high-demand item for each editors! I personally commit to make a PR to each major project I use as I found out about EditorConfig just by being curious about the config file in a project, so, this will definitely boost adoption.
- Dewie 12y agoIf the IDE would just let me plug in whatever editor I like the most, that would be great. I guess there could be conflicts with things like hotkeys, but some tweaking should get rid of such incompatibilities.
- gegtik 12y agoWhy would you launch without Eclipse?
- vidarh 12y agoBecause large portions of the world does not care about Eclipse?
- gherkin 12y agoYou could go ahead and build support yourself.
- th 12y agoWe "launched" a couple years ago with support for only a handful of editors. Most of the plugins have been community-made. No one has submitted an Eclipse plugin yet, but we would love to help make one happen.
- Inversechi 12y agoIf you do go ahead and build support for it there is a small bounty already up for grabs. https://freedomsponsors.org/issue/271/support-eclipse https://freedomsponsors.org/issue/271/support-eclipse
- canadev 12y agoThe idea seems very cool, but I wonder if there is anything like this that could have more language specific stuff like "in JS (or Ruby, or ...) format your hashes/object literals/arrays/constants/... like so." I like this, but the list of supported properties seems pretty short. I can see there might be some difficulties making it language-aware since the file formats are simple globs, but maybe you could say something like: [*.js] language_style = javascript and somewhere describe that language_style in more detail.
- athaeryn 12y agoWhat are you looking to do with "language styles" that you can't do based on file extension?
- deleted 12y ago[deleted]
- canadev 12y agohttps://github.com/felixge/node-style-guide https://github.com/felixge/node-style-guide https://github.com/styleguide/ruby https://github.com/styleguide/ruby This sort of thing...
- mts_ 12y agoThere is JSCS for Javascript: https://github.com/jscs-dev/node-jscs#options https://github.com/jscs-dev/node-jscs#options
- rstacruz 12y agoTypically those are done using configuration files of code-checking tools, such as .jshintrc[1] or .pylintrc. [1]: https://gist.github.com/connor/1597131 https://gist.github.com/connor/1597131
- canadev 12y agoI guess I just figure these two are sort of overlapping. If you use .jshintrc why do you need this tool? (The neat idea being: if a project has many languages, you can share code conventions for all of them in one place.)
- tectonic 12y agoPleased to see RubyMine support!
- gherkin 12y agoMight it make more sense to rather compile the editorconfig file into the respective editor's config file? That way you need not depend on a plugin being written for the editor. This would mean that you could support more editors and enhance editor configurations without having to wait for the plugin to update to support your own new features. This would be at the cost of the ease of simply editing a single file, though it could be set up that, when compiled, the system will back the old config file up and insert the new one in its place.
- th 12y agoEditorConfig support built-in to your text editor is the pipe dream. JetBrains 9 will have EditorConfig support, but no other editors yet support it natively so all of the plugins are necessary currently. Unfortunately many editors do not support project-level configuration files by default. A conversion tool could be a good way to make global configurations even more accessible for editors that do support project configuration files and don't have native EditorConfig support yet. Until native support becomes more common, EditorConfig acts as an unopinionated universal editor-level linter of sorts.
- michaelmior 12y agoThen this would mean that you would have to compile this for every editor anyone editing the code base chose to use. It also means someone editing the code would have to manually copy the config file into the correct location. This kills the fact that EditorConfig plugins can automatically change settings per project, which is where a lot of the usefulness comes from IMO.
- augustl 12y agoI'd love to see an editor that let me see the code in the way I preferred (perhaps even as far as rendering Java as Lisp), but wrote the code to disk according to the EditorConfig.
- rplnt 12y agoFrom what I've seen, people sometimes accomplish this with git hooks. Well, not exactly what you want, but the basic: you see something different as is eventually saved to repository (and vice versa).
- VoxPelli 12y agoCombine with something like https://github.com/schorfES/grunt-lintspaces https://github.com/schorfES/grunt-lintspaces to check that all code complies + some tests before or after you push your code upstream to eg. Git and you'll get a much more consistent code base when it comes to whitespaces.
- reledi 12y agoIf your project doesn't use Grunt, but you do use Vim, you can put the following in your .vimrc " Remove trailing whitespace for everything but markdown. let whitespace_blacklist = ['markdown'] autocmd BufWritePre * if index(whitespace_blacklist, &ft) < 0 | :%s/\s\+$//e There's also several ways to use Git for removing trailing whitespace, if you prefer that.
- teamhappy 12y agoI loved EditorConfig until tools like clang-format[1] and gofmt[2] showed up. Combine those with Git's hooks and you really got something. [1]: http://clang.llvm.org/docs/ClangFormat.html http://clang.llvm.org/docs/ClangFormat.html [2]: https://golang.org/cmd/gofmt/ https://golang.org/cmd/gofmt/
- anishathalye 12y agoScalariform is pretty awesome too: https://github.com/mdr/scalariform https://github.com/mdr/scalariform
- rglover 12y agoHave used this in a handful of projects. Works as advertised. Easy to setup.
- v0rt 12y agoI wonder when Netbeans will support this
- th 12y agoThere is a community-contributed EditorConfig NetBeans plugin but it doesn't have a license or installation instructions: https://github.com/geertjanw/editorconfig-netbeans https://github.com/geertjanw/editorconfig-netbeans
- alaindomissy 12y agoThe logo is so cute. Did you notice the mouse has blue eyes and pink ears ?
- mfsampson 12y agoHmm, I can see the pink ears, the blue eyes not so much. I may need to calibrate my monitor.
- talles 12y agoIt's been a while since I found something immediately useful for me a this thing. Thank you so much. I use Emacs but I hate with passion configuring it. Not anymore :)
- cirosantilli 12y agoI was surprised this only appeared here today.
- th 12y agoIf your favorite editor does not yet have an EditorConfig plugin, feel free to tweet @EditorConfig or open an issue. The Eclipse plugin has a small bounty on it right now. Maybe someone will create one if some more money is pitched in: https://freedomsponsors.org/issue/271/support-eclipse https://freedomsponsors.org/issue/271/support-eclipse