Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.28 KB

mail.rst

File metadata and controls

43 lines (29 loc) · 1.28 KB

after/ftplugin/mail.vim

Add maps to insert X-Advice headers. Obviously we’re not going to convince every one to take part, but they have become popular in work mail.

call keymaps#mnemonic_map('Advice',
\                         #{buffer: v:true, key: 'A', local: v:true})
for s:prio in ['perhaps', 'should', 'must']
    for s:due in ['now', 'soon', 'whenever']
        execute printf('nnoremap <buffer> [Advice]%.1s%.1s ' ..
        \              ':call filetypes#add_advice_header("%s", "%s")<CR>',
        \              s:prio, s:due, s:prio, s:due)
    endfor
endfor
.. seealso::

    * :func:`keymaps#mnemonic_map() <mnemonic_map>`

Kill from current line to signature, as a quick way to scrub large chunks of quoted text:

inoremap <buffer> <C-k>
\   <Cmd>call filetypes#kill_to_signature()<CR>
nnoremap <buffer> <C-k> <Cmd>call filetypes#kill_to_signature()<CR>
.. seealso::

    * :func:`filetypes#kill_to_signature() <kill_to_signature>`