]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vim/after/ftplugin/mail.vim
after/ftplugin/mail.vim: Move cursor after replies.
[config/dotfiles.git] / vim / after / ftplugin / mail.vim
index 94af0bce972c0dc10e0a568c9885b9350562b232..8d46f5a6e28d5f2c5689d3da28d1b96402d41c2b 100644 (file)
@@ -31,8 +31,12 @@ silent! %s/^>\+\zs >/>/g
 silent! %s/^>\+\zs >/>/g
 
 " Move directly after the headers.
-normal gg
-normal }
+normal! gg
+normal! }
+" And if the mail contains a reply move the cursor after the quote.
+if search('^On .\+ wrote:$', 'n')
+    normal! }
+endif
 
 " Fold quotes. Thanks to Teemu Likonen <tlikonen@iki.fi>
 " (http://permalink.gmane.org/gmane.editors.vim.devel/20890,