himalaya/vim/ftplugin/himalaya-msg-write.vim
Clément DOUIN e33a9a72e9
release v0.5.4 (#285)
* replace bsd3 license by bsd4

* add attachments with save and send commands (#284)

* set up tpl save and send commands

* improve msg save and send handlers

* add vim msg#add_attachment fn

* improve vim logs

* update changelog

* add attachment keybind vim doc

* reverse range order fetch envelopes (#276)

* bump version v0.5.4
2022-02-05 00:29:57 +01:00

19 lines
497 B
VimL

setlocal filetype=mail
setlocal foldexpr=himalaya#shared#thread#fold(v:lnum)
setlocal foldmethod=expr
setlocal startofline
if exists("g:himalaya_complete_contact_cmd")
setlocal completefunc=himalaya#msg#complete_contact
endif
call himalaya#shared#bindings#define([
\["n", "ga", "msg#add_attachment"],
\])
augroup himalaya_write
autocmd! * <buffer>
autocmd BufWriteCmd <buffer> call himalaya#msg#draft_save()
autocmd BufLeave <buffer> call himalaya#msg#draft_handle()
augroup end