Stop Vim wrapping lines in the middle of a word

:help wrap

This option changes how text is displayed. It doesn’t change the text
in the buffer, see ‘textwidth’ for that.
When on, lines longer than the width of the window will wrap and
displaying continues on the next line. When off lines will not wrap
and only part of long lines will be displayed. When the cursor is
moved to a part that is not shown, the screen will scroll
horizontally.
The line will be broken in the middle of a word if necessary. See
‘linebreak’ to get the break at a word boundary.

:help linebreak

If on Vim will wrap long lines at a character in ‘breakat’ rather
than at the last character that fits on the screen.

:help breakat

‘breakat’ ‘brk’ string (default " ^I!@*-+;:,./?")

So, :set linebreak and it should work out of box. Or you can restrict breakat to just break on spaces, instead of spaces+punctuation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)