Using textwidth (tw=74) a word will be moved to the next line (with an indent usually) with a newline character at the end of the line avoiding over-length. This is a hard wrap, and resizing the window will not change the location of the wrap. Using :set wrap, soft wrapping sends the text that would fall off the right side of the window to the next line instead, keeping all of a line's text visible. I'd like to combine some of each function, such that a word moves entirely to the next line after a certain point, but does not get permanently sent there in the file with a newline character.

It doesn't matter if this sending to the next line occurs only immediately after a string broaching the set number of columns.


1 Answer 1


I think you're looking for the 'linebreak' option:

:set linebreak

See :help 'linebreak' for details, including the use of 'breakat', 'breakindent', and 'showbreak'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.