1

Could anybody explain, why textwidth works gives me the same effect as linebreak?

Example 1. If I type aaaaaaaaaaaaaaaaaaa several times, the last aaa... is wrapped to the next line. linebreak is off, so why does it happen?

set number
set wrap
set textwidth=79
set colorcolumn=+1

Example 2. Everything works as I expect it. When my reach the right side of screen, only a part of the last aaaaaaaaaaaaaa is wrapped.

set number
set wrap
set colorcolumn=+1
3

:h 'linebreak' has the following:

Unlike 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, it only affects the way the file is displayed, not its contents.

But with :h 'textwidth', a longer line will break with <EOL> after whitespace to get that width.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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