newlines - Join lines inside paragraphs in vim - Super User:

This should do it:

:set tw=99999
gggqG
tw is set to some value at least as large as the number of characters in the longest paragraph. gg moves the cursor to the first line; gq is the command to reformat; G moves the cursor to the last line, telling gq to reformat from the current cursor location to the last line.


Seems to work. So to save paper, I'm taking an article from Firefox, saving as text, pulling out the line breaks with VIm, then printing from Word with very little margins.

Worth it? Doanno. Works though.

Labels: