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 new `max_line_length` property #45

Closed naoyukik closed 9 years ago

naoyukik commented 9 years ago

for the time being I was corresponding max_line_length to rulers.

sindresorhus commented 9 years ago

I see no such property => http://editorconfig.org

naoyukik commented 9 years ago

Complete list of properties https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

sindresorhus commented 9 years ago

Alright, from its description:

Forces hard line wrapping after the amount of characters specified

Shouldn't it change "Word Wrap Column" as that actually enforces the line-width instead of "Rulers" which only creates a guide?

Also needs to be added to the docs.

naoyukik commented 9 years ago

support wrap_width settings.

Is it necessary to force the 'word_wrap'? I want to choose the 'word_wrap' sublime text settings yourself.

sindresorhus commented 9 years ago

Is it necessary to force the 'word_wrap'?

That's the whole point of the property though. I think hard wrapping is totally dumb as all editors supports soft wrapping which gives the user the ability to set their preferred wrapping, but many projects have a set hard wrapping requirement, and the point of this property is to enforce that.

naoyukik commented 9 years ago

I read the "editorconfig.vim". It is written in the comments of "max_line_length". "highlight the columns following max_line_length". I used, it was not a new line.

wrap_width set of sublime text also I seem unnecessary.

sindresorhus commented 9 years ago

I'm not sure what more to say that will not be a repeat of https://github.com/sindresorhus/editorconfig-sublime/pull/45#issuecomment-75715799.

Happy to receive a PR that implements hard-wrapping.

xuhdev commented 9 years ago

@naoyukik The Vim plugin not only highlight the column, but also set textwidth to max_line_length, which means you should get an automatic line breaking when your typing exceeds the max_line_length