From 4f829fe694a7fc14d101bb8b77947192ba45cdfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 17 Oct 2016 22:40:41 +0200 Subject: [PATCH] Cf. #566: Allow "duplicate" mappings --- autoload/vimtex/imaps.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/imaps.vim b/autoload/vimtex/imaps.vim index 1751743..55bd443 100644 --- a/autoload/vimtex/imaps.vim +++ b/autoload/vimtex/imaps.vim @@ -180,6 +180,7 @@ function! s:create_map(map) " {{{1 " function in run time. if has_key(a:map, 'context') execute 'let l:key = "' . escape(l:lhs, '<') . '"' + let l:key .= a:map.rhs let b:vimtex_context[l:key] = a:map.context endif @@ -205,7 +206,7 @@ endfunction " }}}1 function! vimtex#imaps#wrap_environment(lhs, rhs) " {{{1 - for l:env in b:vimtex_context[a:lhs] + for l:env in b:vimtex_context[a:lhs . a:rhs] if vimtex#env#is_inside(l:env) return a:rhs endif