Closed xaka closed 10 years ago
I'm curious in general about how to manually enforce editorconfig rules within Sublime by using this plugin. Does this PR solve that?
@xaka can you add a description to your PR?
@sindresorhus done!
Makes sense. Should probably use the same marker as https://github.com/sindresorhus/editorconfig-sublime/pull/21/files#diff-f090b8cb644d551eaa20693ecc654a5dR29
Mind fixing the merge conflict?
@sindresorhus done!
Nice work! :D
Awesome! Thanks! Is there a UI, or prefs file for this?
@kevinSuttle I'm a little bit confused, but what exactly are you trying to do and why it's related to this PR? What kind of UI are you looking for?
@xaka I'm trying to "Enforce settings for newly created -> saved files" from the Sublime package manager UI or Package settings menu. See an example of the Trailing Spaces plugin.
With this plugin, the user has no way to know what's happening and when, let alone how to control it. Just looking for a preferences file or some sort of UI message/controls.
When users create a new file, it doesn't have a name yet so the plugin doesn't know which settings it should apply. Later, when users save the new file and assign a name to it, they expect the plugin to apply the settings from their
.editorconfig
file according to the new file name and it doesn't happen so they have to close the file and open it again. Very annoying. This PR fixes the problem by applying the settings viaon_post_save
hook. To make sure we don't do that for every save operation (as it might lead to performance degradation), we mark the files and skip them later.