Suppose you've typed a long document in vim with automatic line breaking on, so all the lines have been broken at, say, 79 characters. You may have even applied formatting to the whole document to break all the lines at that length.
Paragraphs are demarcated in your document by blank lines.
Now you decide you don't want line breaks within paragraphs at all.
How can you remove all the line breaks within paragraphs without eliminating the paragraph boundaries altogether?
I have made this quick and idiotic hack, but am looking for the proper way.
:%s/^\s*$/@@@@@ - replace blank lines with @@@@@
ggVGgJ - join all lines in the file
:%s/@@@@@/\r\r/g - replace @@@@@ with line breaks