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

Add support for `max_line_length` #57

Closed joaoe closed 7 years ago

joaoe commented 7 years ago
sindresorhus commented 7 years ago

I thought it was still not working at first, then I realized it only works on new text. Any way to get it to auto wrap existing text? (That's how the other rules work).

sindresorhus commented 7 years ago

And why does it require a plugin for this? Sublime already has Edit => Wrap.

joaoe commented 7 years ago

I thought it was still not working at first, then I realized it only works on new text.

Because of if not view.settings().has(self.MARKER): which is not my code. That prevents applying preferences over and over again to views that gain focus. A better idea would perhaps be to store a timestamp, and then compare with the timestamp of the .editorconfig file or timestamp of the EditorConfig.py file (in case of a new version that changes behavior).

And why does it require a plugin for this? Sublime already has Edit => Wrap.

That, I didn't know... :) Will most likely require rewriting everything.

sindresorhus commented 7 years ago

Closing this for lack of activity. Happy to reopen whenever.

joaoe commented 7 years ago

It's fine, I don't have to look at it now.