Files
himalaya/email-manager/vim/ftplugin/himalaya-msg-write.vim
T
Jason Cox 52b55ac394 implement contact completion with completefunc (#250)
This allows users to define a command for contact completion with
`g:himalaya_complete_contact_cmd` and trigger it with `<C-x><C-u>` when
writing an email.
2021-11-01 09:38:15 +01:00

15 lines
415 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
augroup himalaya_write
autocmd! * <buffer>
autocmd BufWriteCmd <buffer> call himalaya#msg#draft_save()
autocmd BufLeave <buffer> call himalaya#msg#draft_handle()
augroup end