http://unautre.fr/wp-content/plugins/ern/ava.php The gq{motion} command will format a section of text. The ip motion selects the current paragraph, so gqip applies formatting to the current paragraph. Running the gq command moves the cursor to the end of the paragraph. If you want to keep the cursor on the same word, you can instead run the command gw.
http://vimcasts.org/episodes/hard-wrapping-text/