From f321f412e0ac6c0ce2992764481adfbc12b8957f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 23 Mar 2015 20:04:14 +0100 Subject: [PATCH] Add default mappings for table of labels --- autoload/vimtex/labels.vim | 4 ++++ autoload/vimtex/mappings.vim | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/autoload/vimtex/labels.vim b/autoload/vimtex/labels.vim index d9e57ae..ebb7f69 100644 --- a/autoload/vimtex/labels.vim +++ b/autoload/vimtex/labels.vim @@ -14,6 +14,10 @@ function! vimtex#labels#init(initialized) " {{{1 " Define commands command! -buffer VimtexLabelsOpen call vimtex#labels#open() command! -buffer VimtexLabelsToggle call vimtex#labels#toggle() + + " Define mappings + nnoremap (vimtex-labels-open) :call vimtex#labels#open() + nnoremap (vimtex-labels-toggle) :call vimtex#labels#toggle() endfunction " }}}1 diff --git a/autoload/vimtex/mappings.vim b/autoload/vimtex/mappings.vim index 9d46fc7..99677ac 100644 --- a/autoload/vimtex/mappings.vim +++ b/autoload/vimtex/mappings.vim @@ -67,6 +67,11 @@ function! vimtex#mappings#init(initialized) nmap lT (vimtex-toc-toggle) endif + if g:vimtex_labels_enabled + nmap lr (vimtex-labels-open) + nmap lR (vimtex-labels-toggle) + endif + if g:vimtex_view_enabled nmap lv (vimtex-view) if has_key(g:vimtex#data[b:vimtex.id], 'rsearch')