sindresorhus / editorconfig-sublime

Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
MIT License
1.77k stars 108 forks source link

Automatic .editorconfig generation #15

Closed sindresorhus closed 5 years ago

sindresorhus commented 10 years ago

Would be awesome if the plugin could generate an .editorconfig file from the users current settings. That would also make it less scary/hard to get started with it.

PR welcome :)

spywhere commented 9 years ago

Yes, you can implement that into your plugin.

Just load the settings named Preferences.sublime-settings and access the relevant fields such as trim_trailing_white_space_on_save or ensure_newline_at_eof_on_save.

:)

FichteFoll commented 8 years ago

Only thing I'm wondering about is syntax-specific overrides because (I believe that) .editorconfig files override anything that would otherwise be set by ST.

So, I think the .editorconfig generator should attempt to iterate over all syntaxes and check if they have syntax-specific settings. Then include them in the generated .editorconfig file along with the global settings (inherited from Preferences.sublime-settings and overridden by project-specific settings).

sindresorhus commented 5 years ago

I'm gonna skip this. Too complicated to get right. I think a dedicated command-line tool for this would be better.