Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to beep in vim

Tags:

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

like image 925
Jan Hudec Avatar asked May 16 '11 13:05

Jan Hudec


2 Answers

Yes:

:set novisualbell
:set errorbells
:exe "normal \<Esc>"

For more information see:

  • :help beep
  • :help 'errorbells'
  • :help :echoerr
like image 116
Johnsyweb Avatar answered Nov 14 '22 15:11

Johnsyweb


Print the Bell character (Ctrl-G). On Windows echo ^G will cause a beep. Depending on your terminal setup it also works on Linux.

like image 2
Brian Rasmussen Avatar answered Nov 14 '22 14:11

Brian Rasmussen