Sublime Forum

[ST3] Word wrap still iffy

#1

I’ve noticed, as I’ve used Sublime Text to write LaTeX documents, that the word wrap is still a little iffy. It’ll often wrap at the first bracket in a command (so \emph{foo} wraps after \emph{) and split three-dash sequences between lines, and today it wrapped a period all by its lonesome. I know I’m being a nudzh with an edge case, but it’d be great to see this fixed for us Sublime writers.


0 Likes

#2

Unfortunately it sucks. Wrapping a long line as:

\item \textsc{nononono}: on nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom 

gives:

\item \textsc{nononono}: on nom nom nom nom nom nom nom nom nom nom nom nom \nom nom nom nom nom nom nom nom

Its much worse if you leave latex commands around without one empty line. Then:

\begin{enumerate} \item \textsc{nononono}: on nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom \end{enumerate}

becomes:

\begin{enumerate} \item \textsc{nononono}: on nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom \end{enumerate}

0 Likes

#3

I’m sad that this hasn’t been fixed. The strange word wrap behavior is my only complaint about ST2. If it’s not fixed in ST3, I don’t see a reason to upgrade.

0 Likes

#4

Yes, I have the exactly same issue. Another thing I’d like to see it improved is not to break the words concatenated with a dash. If the sentence '… key-value … ’ is broken into ‘… key-’ and ‘value …’, the latex will create a space between a ‘key-’ and ‘value’, so the final document will be like ‘…key- value…’.

0 Likes

#5

Same thing happens with HTML tags, I’ll often get a stray > on a new line, or /p>

0 Likes

#6

Experiencing the same issues with ST3. Any chance of this getting addressed?

0 Likes

#7

The Wrap Plus plugin https://github.com/ehuss/Sublime-Wrap-Plus seems to work well on ST3 now. It allows to fix the hyphen wrap feature by adding:

	"WrapPlus.break_long_words": false,
	"WrapPlus.break_on_hyphens": false,

to one’s preferences.

0 Likes

#8

Bump on this. Wrapping commands and environments is still an issue in ST3.

I am migrating from Emacs to ST, and while ST is really shiny and has wonderful features, small things like this really break the workflow for me. Word wrapping does not work well at all for LaTeX documents.

1 Like