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