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

Re: editor settings



I'll have to try these out. Do these go in a .vimrc or .muttrc ? Or
something else?

Thanks,
Jason

On Fri, Dec 16, 2005 at 11:37:26AM +1100, Cameron Simpson thus spake:
> 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.
> 

-- 
148D 5CC5 2A04 852D 53DC  727F 386F 9068 B3A2 9D47