[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mutt + Vim tricks (replace Nano)



On Sat, Sep 27, 2003 at 06:48:22AM -0700, moseley@hank.org wrote:
| I'm looking for a little quick-start help with Vim (in converting from 
| Nano).  
| 
| Can someone share their vim setup used with email?  The features I care 
| about 

In my .vimrc I have the following mail-specific settings:
    augroup Mail
        au!
        au FileType mail set tw=70 fo=tcrq2 nomodeline
        au FileType mail set comments+=n:\|
        " clear the old sig and go back to the beginning of the buffer
        au BufRead /tmp/mutt* normal :g/^| -- $/,/^$/-1d
gg
    augroup END

(note that between the 'd' and the 'gg' on the last line is a literal
carriage return)

(also note that the "| " at the start of the pattern is the same
as my $indent_string in mutt's configuration, if you use a different
$indent_string then adjust the pattern accordingly))


I'll skip over the other specific requests that have already been
answered.

|     - indent pasted text

I suppose by this you want to paste a section of text, then have it
all indented as is often done when quoting an external source.

What I do here is ":set paste" so the pasted text is unaltered (with
auto indenting and such) and paste the text in.  Then I select the
entire section in visual mode (press "v" to enter visual mode, then
move the cursor to the end of the section you want selected).  Then
pressing ">" while the section is selected will indent it by one
$shiftwidth.  (for options controlling the amount of indent, read the
help on "shiftwidth", "softtabstop" and "expandtab")

-D

-- 
He who walks with the wise grows wise,
but a companion of fools suffers harm.
        Proverbs 13:20
 
http://dman13.dyndns.org/~dman/

Attachment: pgpEdpU1hxgG0.pgp
Description: PGP signature


Reply to: