diff --git a/autoload/repeat.vim b/autoload/repeat.vim index 708c318..246e35c 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -143,17 +143,21 @@ nnoremap (RepeatUndo) :call repeat#wrap('u',v:count) nnoremap (RepeatUndoLine) :call repeat#wrap('U',v:count) nnoremap (RepeatRedo) :call repeat#wrap("\C-R>",v:count) -if !hasmapto('(RepeatDot)', 'n') - nmap . (RepeatDot) -endif -if !hasmapto('(RepeatUndo)', 'n') - nmap u (RepeatUndo) -endif -if maparg('U','n') ==# '' && !hasmapto('(RepeatUndoLine)', 'n') - nmap U (RepeatUndoLine) -endif -if !hasmapto('(RepeatRedo)', 'n') - nmap (RepeatRedo) +let g:vim_repeat_default_mappings = get(g:, 'vim_repeat_default_mappings', 1) + +if g:vim_repeat_default_mappings + if !hasmapto('(RepeatDot)', 'n') + nmap . (RepeatDot) + endif + if !hasmapto('(RepeatUndo)', 'n') + nmap u (RepeatUndo) + endif + if maparg('U','n') ==# '' && !hasmapto('(RepeatUndoLine)', 'n') + nmap U (RepeatUndoLine) + endif + if !hasmapto('(RepeatRedo)', 'n') + nmap (RepeatRedo) + endif endif augroup repeatPlugin