vim-repeat icon indicating copy to clipboard operation
vim-repeat copied to clipboard

Prevent "Press ENTER or type command to continue"

Open Cade-Forester opened this issue 11 years ago • 3 comments

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

Cade-Forester avatar Mar 30 '14 08:03 Cade-Forester

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

tpope avatar Mar 30 '14 16:03 tpope

Steps to reproduce.

  • Create file /tmp/test.vim:
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.

  • Start vim:
vim -u NONE -U NONE -i NONE --noplugin -n -N
  • Type:
source /tmp/test.vim
  • Open some file
:edit file
  • Type
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.

Cade-Forester avatar Mar 30 '14 19:03 Cade-Forester

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".

tpope avatar Mar 30 '14 20:03 tpope