[prog] replacement strings
Monique Y. Mudama
monique at bounceswoosh.org
Mon May 24 19:10:36 UTC 2010
On Mon, May 24 at 19:05, Miriam English penned:
>
> I've been spending hours trying to find something that does the same
> thing as TextPad's join command. (I really want to get rid of my
> need for wine.)
>
> It joins highlighted text into single lines, keeping paragraphs
> distinct. The closest I've been able to find is the fmt command
> (part of the Gnu coreutils, and should be in most linuxes).
> Unfortunately that has an upper limit of 2,500 characters in a
> paragraph, which is unrealistic when trying to reformat some texts,
> especially old ones where most of a page might be a single
> paragraph.
I have the following defined for vim when I'm in an e-mail context:
map <C-J> :let old_tw = &tw<CR>:set tw=72<CR>gqap:let &tw=old_tw<CR>
It should do what you want when you type control + j. You can change
72 to be whatever line length you prefer. Or if you'd rather use
whatever line length is currently defined, you can just do the gqap
part.
I found some details here:
http://openwall.info/wiki/internal/vimrc
--
monique
More information about the Programming
mailing list