Spencer Lu wrote:
I'm running Vim 6.4 on Windows 2000. When I'm using GVim as a normal user, I can hear the beeping noises (for example, if I'm on the last line and then press 'j'). However, when I'm logged in as Administrator, I never hear any beeping noises.

I made a few changes to my _vimrc file, but the file is shared by all users, and none of the changes have to do with the beep, so I don't know why Administrator can't hear the beep.

Anyone know what's going on?  Thanks.


On some terminals, it is possible to configure Vim to use a "visual" bell, i.e., set the whole screen to reverse-video for a short time whenever there's an event which would otherwise cause a bell:

        :set visualbell

It is even possible to use _both_ audio and visual bell, but that requires a little bit of fancy footwork: here is how I do it:

<quote>
set errorbells visualbell                  " use both audio and visual bell
let &t_vb = "\<C-G>" . &t_vb
if has('autocmd') && has('gui')
        " must set it again for the GUI
    augroup vimrclocal
        au GUIEnter * let &t_vb = "\<C-G>\e|50f"
    augroup END
endif
</quote>

where \<C-G> is slash, less-than, C-for-Charlie, dash, G-for-Golf, greater-than; Vim translates it internally to a control-G character, i.e., an ASCII BEL control character, which, on most terminals, rings the bell or sounds the default beep. By concatenating it to the visual-bell control sequence generated by setting 'visualbell' on, I get a combined audio and visual bell which I can neither miss nor confuse with anything else. [For some reason it works in gvim and in the pure-text console (/dev/tty, $TERM == "linux") but not in kde konsole (apparently on /dev/pts/4, $TERM == "xterm"), where I have only the audio bell.]


Best regards,
Tony.

Reply via email to