[PLUG] some awk-fu or perl to word wrap a text file?

Paul Heinlein heinlein at madboa.com
Wed Oct 17 14:51:26 UTC 2007


On Wed, 17 Oct 2007, Russell Senior wrote:

>>>>>> "Paul" == Paul Heinlein <heinlein at madboa.com> writes:
>
> Paul> The added bonus is that fmt works great within vi(m). For 
> Paul> instance, to wrap a really long line of text, [...]
>
> Oh, you just had to go an bring up vi.  In emacs, just put your 
> cursor in the paragraph and type:  M-q

Yeah, yeah. I've always wished for a vi(m) builtin as handy as M-q, 
which I use copiously when working in emacs. Additionally, the 
fill-paragraph command usually does The Right Thing in regard to 
bullet lists, leading whitespace, etc. Getting fmt to understand all 
that is an exercise in frustration.

In (al)pine, I use Eduardo Chappa's very cool fillpara patch that's 
reasonably good at figuring out line-based text prefixes (such as the 
"Paul> " that Gnus used in your reply) and doing paragraph rewrites 
accordingly. It's very handy when replying to e-mail messages with 
long lines or ragged paragraphs.

> Lots fewer keystrokes! ;-)

Emacs users don't get to say that very often, so enjoy it while you 
can! :-)

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/



More information about the PLUG mailing list