Word wrap in Gvim

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.


you can

:set wrap linebreak nolist

:set tw=78

sets the text width to 78 characters. You can use "[movement]gq" to re-wrap some text.


I use the following settings to wrap long lines for things like markdown files.

:set wrap
:set linebreak
:set nolist  " list disables linebreak
:set textwidth=0
:set wrapmargin=0

Source: http://vim.wikia.com/wiki/Word_wrap_without_line_breaks