Documentation fix for repeat#setreg()

Need to :execute the :silent! call to avoid that the remainder of the
command line is aborted together with the call when repeat.vim is not
installed. Otherwise, <SID>MyFunction() won't be invoked, and the
mapping does nothing.
This commit is contained in:
Ingo Karkat 2012-11-29 10:19:30 +01:00 committed by Tim Pope
parent eb97e729be
commit 5974ea07ac

View File

@ -40,7 +40,7 @@
" in your mapping will look like this:
"
" nnoremap <silent> <Plug>MyMap
" \ :<C-U>silent! call repeat#setreg("\<lt>Plug>MyMap", v:register)<Bar>
" \ :<C-U>execute 'silent! call repeat#setreg("\<lt>Plug>MyMap", v:register)'<Bar>
" \ call <SID>MyFunction(v:register, ...)<Bar>
" \ silent! call repeat#set("\<lt>Plug>MyMap")<CR>