From 5744d8415a52dbb454870f8c22f4394cacd0f29a Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 14 Oct 2011 14:49:16 +0200 Subject: [Vim] mail hooks/binds --- vimrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index e995284..5ab50a8 100644 --- a/vimrc +++ b/vimrc @@ -118,7 +118,10 @@ set noexpandtab map U yyp:s/[^ ]/-/g:noh map Y yyp:s/[^ ]/=/g:noh -map Q v/$\n\nJ:.!fmt -tcw78:noh + +" Reformatting is done using 'gq' +map Q :s/^/> / +map q :s/^[ ]*>[ ]*// map u :noh @@ -188,11 +191,10 @@ map b :GitBlameCurrentLine " n goto next empty reply-to paragraph " m opens an empty reply-paragraph at this line -" d deletes everything until but the signature +" d deletes everything from there onto the signature " w reformats entire mail but the signature -" D deletes everything until but the next reply-to § +" D deletes all the quote above autocmd BufRead /tmp/mutt-*[0-9a-f] map n /^> $ -autocmd BufRead /tmp/mutt-*[0-9a-f] map m 'ddO-I autocmd BufRead /tmp/mutt-*[0-9a-f] map D ^d?^\([^>]\\|$\)?+O autocmd BufRead /tmp/mutt-*[0-9a-f] map d ^d/^-- $O autocmd BufRead /tmp/mutt-*[0-9a-f] map w ggv/^-- $:!par rTbgqRe 'B=.,?_A_a' 'Q=_s>\|' -- cgit v1.2.3