From cf921dadceae27d05ae05543342af23e3b6955e5 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Sat, 12 Jan 2019 15:58:06 +0100 Subject: [PATCH] Fix breaking of keymap behavior --- plugin/auto-pairs.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index b2a9af7..b062ba8 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -501,6 +501,20 @@ function! AutoPairsInit() execute 'noremap ' . g:AutoPairsShortcutJump. ' :call AutoPairsJump()' end + if &keymap != '' + let l:imsearch = &imsearch + let l:iminsert = &iminsert + let l:imdisable = &imdisable + execute 'setlocal keymap=' . &keymap + execute 'setlocal imsearch=' . l:imsearch + execute 'setlocal iminsert=' . l:iminsert + if l:imdisable + execute 'setlocal imdisable' + else + execute 'setlocal noimdisable' + end + end + endfunction function! s:ExpandMap(map)