I write set lbr in my vimrc file but I don't know the meaning of that. What does this option do? I know it's about line-breaking but I need more explanation. This is from the Vim document and I can not understand it.

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

Can someone explain this document to me by an example?

1 Answer 1


If lbr is not set and wrap is set the long lines will be break at the window width (cutting words in two if necessary).

If present and wrap is set the long line will be break as much as possible at a character that belong to breakat (typically after a punctuation or a white space).

If you have 45 positions available on screen.

You have without lbr (:set nolbr and set wrap): enter image description here

You have with lbr (:set lbr and :set wrap) enter image description here

If wrap is not set the line are not wrapped (:set nowrap) enter image description here

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.