abrookins / WrapToColumn

An IntelliJ plugin that wraps text
Apache License 2.0
62 stars 12 forks source link

Handling of sentence ending #23

Open tschijnmo opened 7 years ago

tschijnmo commented 7 years ago

Thank you for such an awesome tool! It satisfies basically all my need. But there might be a small problem with the space after a sentence ending. In both vim gq and emacs fill-paragraph, two spaces are automatically added after a sentence. For instance,

A sentence.
Another one.

would be wrapped into

A sentence.**Another one.

where *s are used emphasize spaces. It would be great if WrapToColumn could add support for this. This could make the plugin more vim/emacs-like and could be a great help for code bases with consistency requirement on this. For instance, Python PEP8 recommends this style of sentence spacing and it is used throughout its official code base.

abrookins commented 7 years ago

I favor a single space between sentences, but I agree that a configuration option would be useful! I'll add this when I have time again. Thank you!

tschijnmo commented 7 years ago

@abrookins Actually I am not in favor of double spacing either. Just in same cases the code base has consistency requirement and this can be an issue. Thank you!