From 587de04765e69f3e32aa2067303322fa841c64b3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 13 Jul 2018 13:25:13 +1200 Subject: Move to after headers when writing new mail --- vim/after/ftplugin/mail.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vim/after') diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 3ecc0310..fa1b9443 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -3,6 +3,13 @@ if &filetype !=# 'mail' || v:version < 700 finish endif +" We will almost always want to start editing after the headers, so move to +" the first entirely blank line, if something hasn't already moved us from the +" start of the file +if line('.') == 1 && col('.') == 1 + call search('^$', 'c') +endif + " Add a space to the end of wrapped lines for format-flowed mail setlocal formatoptions+=w let b:undo_ftplugin .= '|setlocal formatoptions<' -- cgit v1.2.3