Sublime Forum

Word Wrapping Issue

#1

Iā€™m running Linux 64-bit, build 2177.

In a plain text file (Syntax checked is ā€œPlain Textā€) with Word Wrap checked and Word Wrap Column set to ā€˜Automaticā€™, Iā€™m getting the occasional incorrect word wraps - where the edge of the window falls at the end of a line, ST will break a line between the last character of the last word and a period, so that in the wrapped line the period is the first - and sometimes the only character in the wrapped line. Given the line

Now is theā€¦country.

Sometimes ST will wrap it like this:

Now is theā€¦country
.

ST will also break at a quote character, leaving the quote as the only character on the wrapped line, thusly: Given the line ā€œNow is theā€¦country.ā€ it will wrap like this:

"Now is theā€¦country.
"

or even like this:

ā€œNow is theā€¦country
.ā€ Now is theā€¦

This is a bit unusal. Most wraps in ST occur where and how you want, but these unusual cases will occasionally occur in a large file. Obviously, with plain text you donā€™t want this kind of wrapping.

If you delete one or more characters from the line before one of these hanging wraps, the hanging character shows up in the previous line where it should - and also shows there isnā€™t a blank character just before the period or quote that is causing the issue.

0 Likes

#2

Word wrapping isnā€™t particularly smart, and this is unlikely to change until Sublime Text 3

0 Likes

#3

This issue is bothering me, too. Plus I donā€™t understand it at all - if I replace the period character with a comma (ā€™,ā€™) or an exclamation mark (ā€™!ā€™), the wrapping behaves exactly as expected (wrap in front of the word that comes before the punctuation character:

Period character:

My long line comes to an end .

Exclamation mark character:

My long line comes to an end!

This is ā€¦ weird. And not quite understandableā€¦ If this is really not going to change until ST3, when will that be? I can be patient :wink: Until then - Is there some kind of workaround to this behaviour?

Cheers,
Ole.

0 Likes

Line break problem: period separated from word
#4

Hi gardiner,

did you make any progress in changing the odd wrapping behaviour?

Yours,
Tom

0 Likes

#5

I implore the developers to fix this earlier than ST3. This goes against all conventions, and makes ST2 annoying to use as a writing tool. The app has so much polish outside of this, its a shame to have such a niggling and obvious bug kicking around.

Thanks in advance.

0 Likes

#6

please, fix this bug
.

or I shall exhume TextMate!

0 Likes

#7

ā€¦which will need a new license.

I think this word wrapping issue should not be treated as a new feature for ST3 but as a bug fix to the current implementation. Also, Alt-Q is similarly broken: a nicely formatted text with ā€œword wrap at rulerā€ activated gets scrambled up when I select it and hit Alt-Q although, from what I understand, it should simply insert newlines at the end.

0 Likes

#8

Any updates on this issue? Iā€™ve been struggling with it for a while now too hoping that someone might post an encouraging update to this thread, but alas. Very eager to get a fix for this because I write a ton of Markdown and this wrapping issue is quite a bother.

0 Likes

#9

Thought Iā€™d add my plaint to the pile. I use Sublime for everything now, but primarily for non-code writing (in LaTeX and Markdown), and this can be pretty annoying. Sublime particularly likes to drop the closing brace of a TeX command on the next line, but it also affects periods and parentheses.

Iā€™m glad itā€™s something that youā€™re looking into for some future version, but itā€™ll be hard to feel confident buying a whole brand-spankinā€™-new ST3 with this unresolved.

0 Likes

#11

Seconded, this is incredibly annoying. Sublimeā€™s no distraction free mode is perfect for writing prose, but whenever I hit this bug I wish I were using a different editor. With all the cool features available in SB2, itā€™s embarrassing a bug as simple as this has persisted for so long. Arguably, text wrapping should be different depending on the syntax, and that makes the general implementation of this feature a lot more complex, but for plain text files alone thereā€™s no excuse to implement this properly.

0 Likes

#12

Just wanted to add that:

  • Besides Plain text, the issue plaques Markdown as well

  • The spaces are also affected (at least in the build 2217 under Windows 7)

And yes, itā€™s a huge fly in an otherwise delicious ointment. Maybe it doesnā€™t matter for code, but for ā€˜markup and proseā€™ itā€™s kind of heartbreaking.

0 Likes

#13

Agreed that this seems frustrating and silly. Especially when the syntax is set to Markdown or MutliMarkDown, this behavior should kick in automatically.

0 Likes

#14

I use ST2 for a lot of MMD editing, and love it, except for this one glaring issue. Has this been addressed at all in the ST3 beta?

0 Likes

#15

Itā€™s fixed in ST3 :smiley:

0 Likes

#16

Except for square brackets apparently :frowning:

So you might get this:

Because [Wikipedia] 
1] is very popular...
0 Likes

#17

Another vote for fixing in ST2. This is a bug, plain and simple, and should be fixed, please. Thanks!

0 Likes

#18

This should be fixed.

0 Likes