import { op } from "https://deno.land/x/ddu_vim@v4.0.0/deps.ts";
const { visualbell } = op;
Use a visual bell instead of beeping. The terminal code to display the visual bell is given with 't_vb'. When no beep or flash is wanted, use:
:set vb t_vb=
If you want a short flash, you can use this on many terminals:
:set vb t_vb=[?5h$<100>[?5l
Here $<100> specifies the time, you can use a smaller or bigger value to get a shorter or longer flash.
Note: Vim will limit the bell to once per half a second. This avoids having to wait for the flashing to finish when there are lots of bells, e.g. on key repeat. This also happens without 'visualbell' set.
In the GUI, 't_vb' defaults to "<Esc>|f"
, which inverts the display
for 20 msec. If you want to use a different time, use "<Esc>|40f"
,
where 40 is the time in msec.
Note: When the GUI starts, 't_vb' is reset to its default value. You
might want to set it again in your gvimrc
.
Does not work on the Amiga, you always get a screen flash. Also see 'errorbells'.
(default off)