.vim/ftplugin/mail.vim

Mon, 18 Jul 2016 13:38:23 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 18 Jul 2016 13:38:23 -0400
changeset 352
a19225f9b247
parent 351
47b0510974fe
child 361
7ab7173fb61f
permissions
-rw-r--r--

Numbered-list wrap doesn't work for flowed emails

349
976c8bf0499b set reflow_wrap = wrap
Meredith Howard <mhoward@roomag.org>
parents: 348
diff changeset
1
351
47b0510974fe fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents: 349
diff changeset
2 function JumpAndInsert()
348
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 if line('$') > 1
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 :/^$/
351
47b0510974fe fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents: 349
diff changeset
5 :normal 2]
348
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 :+1
351
47b0510974fe fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents: 349
diff changeset
7 :exe 'startinsert'
348
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 endif
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 endfunction
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 augroup mail_filetype
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 autocmd!
351
47b0510974fe fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents: 349
diff changeset
13 autocmd VimEnter /tmp/mutt* :call JumpAndInsert()
348
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 augroup END
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 setl textwidth=72
352
a19225f9b247 Numbered-list wrap doesn't work for flowed emails
Meredith Howard <mhoward@roomag.org>
parents: 351
diff changeset
17 setl formatoptions=aw
348
d72bc8c8d6f0 use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 setl spell

mercurial