<<< Date Index >>>     <<< Thread Index >>>

Re: editor settings



On 15Dec2005 13:58, Jason Helfman <jhelfman@xxxxxxxxxxxxxx> wrote:
| I was wondering if there is any setting that can be done in editor/mutt that
| will post wrap everything to a character length per line. I am always
| finding myself using vi commands to edit a document when I am editing
| something before I send it. I am only doing this so it is properly
| formatted.

I do one of three things, depending on what I'm doing.

The basic reformatter is to pipe a paragraph through fmt:

        !}fmt^M

I have two keyboard macros obtained from others that find very handy:

        map ^V^I J79^V|F r^M
        map ^V^[[18~ /^[^a-z_A-Z]*$/^Mkmp?^Mj!'pfmt^M

In the above, ^x is a literal ctrl-x. Those lines are from my exrc.

The first one maps TAB (^I) to "join the next line then break at the
word that crosses column 79". This lets you go to a paragraph's first
line and just type "TAB, TAB ..." reflowing the paragraph line by line.

The second maps the usual escape sequence for F7 to "go to the start
of the current paragraph (line containing no letters) and reformat it
using fmt". So you move to anywhere in a paragraph and press F7 and it
gets reflowed.  I've done this paragraph with it.

I use these a lot. Very handy.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The laws of thermodynamics state that you can't win, you can't break even,
and you can't even quit the game.  Most human institutions are based on the
belief that you can break one of the three laws -- capitalism assumes you can
win, socialism assumes you can break even, and religion assumes you can quit
the game.