How do I make Gvim word wrap in such a way that doesn't break words in the middle?
You can use "[movement]gq" to re-wrap some text.
Command to toggle word wrap in Vim While :set wrap will turn on word wrap in Vim and :set nowrap will turn off word wrapping, you can also use both commands with the ! (bang) symbol to toggle word wrap.
Answer: To get Vim to not wrap text, issue the "vim set nowrap" command, like this: :set nowrap. By default vim will wrap long lines in the editor, but this command changes that display, so long lines will now go off-screen to your right.
It is better to use the :normal command with ! -specifier in this case to avoid clashes with custom mappings. – ib.
Looks like there is a solution online after all.
:set formatoptions=l :set lbr
Link: http://vim.wikia.com/wiki/Word_wrap_without_line_breaks
You can
:set nowrap
to just let huge lines scroll of the edge of your screen. But tw is probably the better way to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With