summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2011-10-14 14:49:16 +0200
committerHugues Hiegel <hugues@hiegel.fr>2011-10-14 14:49:16 +0200
commit5744d8415a52dbb454870f8c22f4394cacd0f29a (patch)
tree87553d902078e19bc9867264f8e258379389bfb8
parentfd704477f6bc3427581bcc4a0de3b204374750a1 (diff)
[Vim] mail hooks/binds
-rw-r--r--vimrc10
1 files 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<CR>:noh<CR>
map Y yyp:s/[^ ]/=/g<CR>:noh<CR>
-map <ESC>Q v/$\n\n<CR>J:.!fmt -tcw78<CR>:noh<CR>
+
+" Reformatting is done using 'gq<motion>'
+map <ESC>Q :s/^/> /<CR>
+map <ESC>q :s/^[ ]*>[ ]*//<CR>
map <ESC>u :noh<CR>
@@ -188,11 +191,10 @@ map <ESC>b :GitBlameCurrentLine<CR>
" <ESC>n goto next empty reply-to paragraph
" <ESC>m opens an empty reply-paragraph at this line
-" <ESC>d deletes everything until but the signature
+" <ESC>d deletes everything from there onto the signature
" <ESC>w reformats entire mail but the signature
-" <ESC>D deletes everything until but the next reply-to §
+" <ESC>D deletes all the quote above
autocmd BufRead /tmp/mutt-*[0-9a-f] map <ESC>n /^> $<CR>
-autocmd BufRead /tmp/mutt-*[0-9a-f] map <ESC>m 'ddO<CR><CR><ESC>-I
autocmd BufRead /tmp/mutt-*[0-9a-f] map <ESC>D ^d?^\([^>]\\|$\)?+<CR>O<ESC>
autocmd BufRead /tmp/mutt-*[0-9a-f] map <ESC>d ^d/^-- $<CR>O<ESC>
autocmd BufRead /tmp/mutt-*[0-9a-f] map <ESC>w ggv/^-- $<CR><UP>:!par rTbgqRe 'B=.,?_A_a' 'Q=_s>\|'<CR>