Reply to an email, easily delete the parts below line
When I reply to emails, mutt fires up vim. Then I can quickly navigate until I reach the parts I want to reply to specifically. Sometimes it’s just a portion of the whole email, so I want to leave out the rest. Matthias shared a nice tip that allowed him to do that quickly.
Unfortunately, it wasn’t working properly for me. I figured out it’s because in markdown mode, I use folding. By default, my own signature is folded. So I modified the rule a little bit, and here it goes, just add in your ~/.vimrc:
So when you’re below the part you’re replying to, just press
,dd and it will delete the rest of the email between
the line and your signature.
It only works if your signature is well delimited by
and if folding is on. If you do not use folding, then use
the original config provided by
noremap ,dd :.;/^-- $/dO--