J. Scott Merritt wrote:
>Is there a convenient way to write a message on the status line
>(e.g. echo "You hit the wrong key") and then have that message
>automatically erased, either
>- After a short amount of time -or alternatively-
>- Upon the next operator keystroke ?
The function below, TansientEcho, does what you want (tested).
You can additionally define a command name for it using the :command.
Or you can just call it using :call, as in the example.
while passed < a:millisec
if getchar(1) != '0' | break | endif
" example usage:
call TransientEcho("You hit the wrong key", 2000)