links.vim 1.0 KB

123456789101112131415
  1. " vim: set fdm=marker et ts=4 sw=4 sts=4:
  2. function! pandoc#keyboard#links#Init() abort "{{{1
  3. noremap <buffer> <silent> <Plug>(pandoc-keyboard-links-open) :call pandoc#hypertext#OpenLink( g:pandoc#hypertext#edit_open_cmd )<cr>
  4. noremap <buffer> <silent> <Plug>(pandoc-keyboard-links-split) :call pandoc#hypertext#OpenLink( g:pandoc#hypertext#split_open_cmd )<cr>
  5. noremap <buffer> <silent> <Plug>(pandoc-keyboard-links-back) :call pandoc#hypertext#BackFromLink()<cr>
  6. noremap <buffer> <silent> <Plug>(pandoc-keyboard-links-file-back) :call pandoc#hypertext#BackFromFile()<cr>
  7. if g:pandoc#keyboard#use_default_mappings == 1 && index(g:pandoc#keyboard#blacklist_submodule_mappings, 'links') == -1
  8. nmap <buffer> <localleader>gl <Plug>(pandoc-keyboard-links-open)
  9. nmap <buffer> <localleader>sl <Plug>(pandoc-keyboard-links-split)
  10. nmap <buffer> <localleader>gb <Plug>(pandoc-keyboard-links-back)
  11. nmap <buffer> <localleader>gB <Plug>(pandoc-keyboard-links-file-back)
  12. endif
  13. endfunction