Add default mappings for table of labels

This commit is contained in:
Karl Yngve Lervåg 2015-03-23 20:04:14 +01:00
parent a88ca00e8f
commit f321f412e0
2 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,10 @@ function! vimtex#labels#init(initialized) " {{{1
" Define commands " Define commands
command! -buffer VimtexLabelsOpen call vimtex#labels#open() command! -buffer VimtexLabelsOpen call vimtex#labels#open()
command! -buffer VimtexLabelsToggle call vimtex#labels#toggle() command! -buffer VimtexLabelsToggle call vimtex#labels#toggle()
" Define mappings
nnoremap <buffer> <plug>(vimtex-labels-open) :call vimtex#labels#open()<cr>
nnoremap <buffer> <plug>(vimtex-labels-toggle) :call vimtex#labels#toggle()<cr>
endfunction endfunction
" }}}1 " }}}1

View File

@ -67,6 +67,11 @@ function! vimtex#mappings#init(initialized)
nmap <silent><buffer> <localleader>lT <plug>(vimtex-toc-toggle) nmap <silent><buffer> <localleader>lT <plug>(vimtex-toc-toggle)
endif endif
if g:vimtex_labels_enabled
nmap <silent><buffer> <localleader>lr <plug>(vimtex-labels-open)
nmap <silent><buffer> <localleader>lR <plug>(vimtex-labels-toggle)
endif
if g:vimtex_view_enabled if g:vimtex_view_enabled
nmap <silent><buffer> <localleader>lv <plug>(vimtex-view) nmap <silent><buffer> <localleader>lv <plug>(vimtex-view)
if has_key(g:vimtex#data[b:vimtex.id], 'rsearch') if has_key(g:vimtex#data[b:vimtex.id], 'rsearch')