ehuss / Sublime-Wrap-Plus

Enhanced "wrap lines" command for Sublime Text 2 or 3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaTeX trailing spaces in paragraph

ph03 opened this issue · comments

Hi! I love your plugin and only want to report a minor issue that I find a little bit annoying in latex paragraphs: say I have a long paragraph of the form

A common manual technique to solve this major problem is an interactive expert-driven trial and error approach: a certain simple seed structure (e.g., a straight line) is moved around until relevant flow features are sufficiently visualized.

I would like to wrap it like this

A common manual technique to solve this major problem is an interactive
expert-driven trial and error approach: a certain simple seed structure (e.g., a
straight line) is moved around until relevant flow features are sufficiently
visualized.

However, currently the plugin wraps it like this

A common manual technique to solve this major problem is an interactive expert-
driven trial and error approach: a certain simple seed structure (e.g., a
straight line) is moved around until relevant flow features are sufficiently
visualized.

which is bas because of the trailing and dangling '-', which results in bad rendering
of the text, which is displayed with an additional whitespace.
Is it possible to not consider '-' as word separators (perhaps only for latex documents)
to support my suggested behaviour? I have already tried to change the sublime "word_separators"
property without success. Maybe this property could be used by the plugin to make this choice
user specifiable.

I also tried to modify the

sep_chars = '!@#$%^&*=+`~\'\":;.,?_-'

constant of the plugin by removing the '-' without success...

Any help is appreciated :)

In your user settings (Packages/User/Preferences.sublime-settings) set "WrapPlus.break_on_hyphens" to false. You can also set this on a per-syntax basis.

Oh this is great, works perfectly! I didn't knew about this option, sorry, I should have read the docu more thoroughly! Thanks a lot!