开发者

How to beep in vim

开发者 https://www.devze.com 2023-03-06 10:45 出处:网络
Is there any way to explicitly request vim to beep, preferably without having to run external commands?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号