preserve Ctrl-R map

works fine if <c-r> is not an <expr> map
This commit is contained in:
Konfekt 2015-01-05 12:50:31 +01:00
parent 5eba0f19c8
commit f13237c4c4

View file

@ -108,7 +108,9 @@ nnoremap <silent> u :<C-U>call repeat#wrap('u',v:count)<CR>
if maparg('U','n') ==# ''
nnoremap <silent> U :<C-U>call repeat#wrap('U',v:count)<CR>
endif
nnoremap <silent> <C-R> :<C-U>call repeat#wrap("\<Lt>C-R>",v:count)<CR>
let ctrlR = (maparg('<C-R>','n') == "" ? '<C-R>' :maparg('<C-R>', 'n'))
substitute(ctrlR,'<','\<Lt>','g')
execute 'nnoremap <silent> <C-R> :<C-U>call repeat#wrap("'. ctrlR .'",v:count)<CR>'
augroup repeatPlugin
autocmd!