Robert Cussons wrote:
Hi all,

I'm sorry, I know this should be a problem that I can resolve for myself, but I have searched the vim help under "bells" and "visualbell" and tried what it says and it doesn't seem to work, so your help would be greatly appreciated. Basically, I always get the beeping sound when I press 'k' but I'm already at the top of the file, for example and I want to turn it off. I am running vim 7.0 on Windows XP Pro SP2. I have:

set vb t_vb=''

in my _vimrc, I have also set it without the quote marks.
I also have

set novb

and:

set noeb

in my _vimrc and I still get the noise! I am starting to wonder if my _vimrc is actually being read from, it is located in: C:\Program Files\Vim, although I put a copy into: C:\Program Files\Vim\vim70 to see if that would resolve it but it made no difference. Is there a way to get vim to tell me which _vimrc it has read when loading? If I type:

:set t_vb=?

into gvim, I get:

 t_vb=^[|f

which I believe reads as "escape character f" according to the help file, which has the sentence:

        <Escape><Bar>f


In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display for 20 msec.

I don't understand what "inverts the display" means, unless it means turn the display upside down, which sounds a bit strange! Anyway, it was the fact that I seem to have the default value that leads me to believe that my _vimrc isn't being read.

Sorry for the rambling, but if someone has the time to explain all this to me (or even some of it) I would be very grateful, thanks very much for any help.

Rob.


"Inverting the display" means changing black to white, white to black, yellow to blue, blue to yellow, red to cyan, cyan to red, green to magenta, magenta to green, etc., all over the screen. The "visual bell" does it for a fraction of a second, if enabled.

As noted under ":help 'visualbell'", to disable both visual and audio bell, you must set 'visualbell' *ON* (not off), and clear the corresponding pseudo-termcap entry, as follows:

        " no bells wanted
        set vb t_vb=
        " must reset it again when the GUI starts
        if has("gui")
                autocmd GUIEnter * set t_vb=
        endif

I use the opposite setting: by setting 'visualbell' on and appending a control-G at the start of &t_vb I get both audio and visual bells.


Best regards,
Tony.

Reply via email to