aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/mail.vim14
1 files changed, 10 insertions, 4 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 34c524e1..16c228cd 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -3,11 +3,17 @@ if &filetype !=# 'mail' || &compatible || 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 something hasn't already moved the cursor, we'll move to an optimal point
+" to start writing
if line('.') == 1 && col('.') == 1
- call search('\m^$', 'c')
+
+ " Start by trying to move to the first quoted line; this may fail if there's
+ " no quote, which is fine
+ call search('\m^>', 'c')
+
+ " Now move to the first quoted or unquoted blank line
+ call search('\m^>\=$', 'c')
+
endif
" Add a space to the end of wrapped lines for format-flowed mail