aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/mail.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-14 19:40:02 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-14 19:40:02 +1200
commit86ee76daf5650d2c0526a6d7567ac3853c03b732 (patch)
tree0d149bc6e1210efa29ef4c0be7c955bf1b297a62 /vim/after/ftplugin/mail.vim
parentWrap mail starting point guesser in command-func (diff)
downloaddotfiles-86ee76daf5650d2c0526a6d7567ac3853c03b732.tar.gz
dotfiles-86ee76daf5650d2c0526a6d7567ac3853c03b732.zip
Move to body text correctly for start guesser
Diffstat (limited to 'vim/after/ftplugin/mail.vim')
-rw-r--r--vim/after/ftplugin/mail.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index d9a24082..43586731 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -6,6 +6,12 @@ let b:quote_space = 0
" to start writing
function! s:SuggestStart() abort
+ " Move to top of buffer
+ call setpos('.', [0, 1, 1, 0])
+
+ " Move to body text
+ 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')