Skip to content

Override default keybindings

Alex edited this page Dec 3, 2018 · 4 revisions

Vmail mappings are bound to <Plug> functions. Lets take the example of the next message mapping.

 if !hasmapto('<Plug>VmailMessageWindow_ShowNext')
    nmap <buffer> <C-j> <Plug>VmailMessageWindow_ShowNext
    nmap <buffer> <leader>j <Plug>VmailMessageWindow_ShowNext
  endif
  nnoremap <buffer> <unique> <script> <Plug>VmailMessageWindow_ShowNext :call <SID>show_next_message()<CR>

If one wants vmail to skip the c-j mapping, they would need to add a mapping for the corresponding <Plug>... function in their .vimrc like so:

  nmap <buffer> <leader>j <Plug>VmailMessageWindow_ShowNext