Unfortunately it sounds like this is a documented limitation of Vim. From the documentation of linebreak (the option which causes per-word line breaks instead of per-character):
This option is not used when the 'wrap' option is off or 'list' is on.
Alternate solution: highlight end-of-lines. The simple one-time way would be to just search for them (/$). Beyond that, you can use highlighting:
:highlight endofline ctermbg=Green
:match endofline /$/
That'll give your EOLs green backgrounds. See :help highlight-args
for more on how you can specify the highlight.
Original answer
This is not the OP's actual problem, but could sometimes happen, so I'll leave it here for others to find when they search.
From the help on 'list'
:
Note that list mode will also affect formatting (set with 'textwidth' or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for changing the way tabs are displayed.
From the help on 'cpoptions'
:
L When the 'list' option is set, 'wrapmargin', 'textwidth', 'softtabstop' and Virtual Replace mode (see |gR|) count a as two characters, instead of the normal behavior of a .
'cpoptions'
is all about vi-compatibility - are you launching vim
as vi
? Or are you
manually setting any of those flags? Check the output of echo &cpoptions
, be sure to launch as vim
, and if it's still set (no idea why it would be) you can unset the flag (set cpoptions-=L
).
And of course, make sure that the settings for wrap
, wrapmargin
, linebreak
, and textwidth
are what you want.