diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 19:40:02 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 19:40:02 +1200 |
commit | 86ee76daf5650d2c0526a6d7567ac3853c03b732 (patch) | |
tree | 0d149bc6e1210efa29ef4c0be7c955bf1b297a62 | |
parent | Wrap mail starting point guesser in command-func (diff) | |
download | dotfiles-86ee76daf5650d2c0526a6d7567ac3853c03b732.tar.gz dotfiles-86ee76daf5650d2c0526a6d7567ac3853c03b732.zip |
Move to body text correctly for start guesser
-rw-r--r-- | vim/after/ftplugin/mail.vim | 6 |
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') |