In VIM, how do I break one really long line into multiple lines?

Say I have a super long line in the VIM editor (say around 300+ characters). How would I break that up into multiple lines so that the word boundaries roughly break at 80 characters?

Example:

This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line This is a really long line

to

This is a really long line 
This is a really long line
This is a really long line
This is a really long line
This is a really long line
This is a ...

Solution 1:

Vim does this very easy (break lines at word boundaries).

gq{motion} % format the line that {motion} moves over
{Visual}gq % format the visually selected area
gqq        % format the current line
...

I'd suggest you check out :help gq and :help gw.

Also setting textwidth (tw) will give you auto line break when exceeded during typing. It is used in gq too, though if disabled gq breaks on window size or 79 depending on which comes first.

:set tw=80

By setting format options to include text width vim will automatically break at the tw setting.

:set fo+=t

Solution 2:

First set your vim so that it understands that you want 80 characters:

:set tw=80

then, hilight the line:

V

and make vim reformat it:

gq