How to beep in vim
Is there any way to explicitly request vim to beep, preferably without having to run external commands?
开发者_开发问答The reason is that I often run commands (like :make
) that take quite long, so I start doing something else, but than I need to be alerted to the fact that the task finished. So there is no error that would cause vim to beep, but I can run arbitrary command, so I need some command that would make it beep (ok, with running external program it's doable, but I'd prefer more portable method).
Yes:
:set novisualbell
:set errorbells
:exe "normal \<Esc>"
For more information see:
:help beep
:help 'errorbells'
:help :echoerr
Print the Bell character (Ctrl-G). On Windows echo ^G
will cause a beep. Depending on your terminal setup it also works on Linux.
精彩评论