From 4df9f85e45e005f3d422ccb59b0e81a08f676490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sat, 17 Sep 2016 12:28:52 +0200 Subject: [PATCH] Fix #558: escape backslash for imaps --- autoload/vimtex/imaps.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vimtex/imaps.vim b/autoload/vimtex/imaps.vim index 02614d6..c8b4919 100644 --- a/autoload/vimtex/imaps.vim +++ b/autoload/vimtex/imaps.vim @@ -174,7 +174,7 @@ function! s:create_map(map) " {{{1 endif silent execute 'inoremap ' l:lhs - \ l:wrapper . '("' . l:lhs . '", ' . string(a:map.rhs) . ')' + \ l:wrapper . '("' . escape(l:lhs, '\') . '", ' . string(a:map.rhs) . ')' let s:created_maps += [a:map] endfunction