tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.59k stars 81 forks source link

Prevent "Press ENTER or type command to continue" #24

Open Cade-Forester opened 10 years ago

Cade-Forester commented 10 years ago

Do not show "Press ENTER or type command to continue" message after type ".". Prepend "silent!"

tpope commented 10 years ago

How do I reproduce? :silent! hides all errors so I don't want to introduce it blindly.

Cade-Forester commented 10 years ago

Steps to reproduce.

set runtimepath+=~/.vim/bundle/vim-repeat
set columns=40
function! Test____________________________________ ()
   normal! dd
   silent! call repeat#set( ":call Test____________________________________()\n", v:count )
endfunction
nnoremap <silent> dd :call Test____________________________________()<cr>

Function has a long name.

vim -u NONE -U NONE -i NONE --noplugin -n -N
source /tmp/test.vim
:edit file
dd

and

.

Result: message "Press ENTER or type command to continue"

Sorry, i just test that my patch does not solve problem. Need replace "feedkeys(cmd)" on ":execute cmd", but this break compatibility.

tpope commented 10 years ago

You should be able to work around this by adding a <silent> <Plug>Test map in the middle to actually :call Test, and then feed that in as "\<Plug>Test".