How to prevent putty / VIM bell on greater than character

1

1

I'm ussing Putty to connect via SSH and running VIM. Whenever I enter a greater than character '>' the bell sound rings.

I can disable the bell entirely in Putty but that's not ideal.

Can anyone suggest why the bell rings when entering this character and how to make it stop?

Hibiscus

Posted 2012-06-04T17:01:44.587

Reputation: 157

1hu... what? That the bell rings when typing the '>' in insert mode?? does it happen only with the '>' character? – leonbloy – 2012-06-04T17:40:36.713

The bell rings whenever the > character is typed in insert mode. Presumably there are other times that the bell rings in VIM although I can't think of what they are right now. But if I type something like this:

<html><head>

the bell would ring twice – Hibiscus – 2012-06-05T16:17:09.517

Answers

1

You may need to disable the bell in VIM


PuTTY is responding to a terminal bell signal sent from VIM. To disable it type the following while in VIM normal (not insert) mode (hit ESC several times to make sure).

:set vb t_vb=

This will disable the audible and visual bell entirely for VIM.

You can add it to ~/.vimrc to make it permanent.

Jeremy W

Posted 2012-06-04T17:01:44.587

Reputation: 3 529

But VIM normally beeps when you've press some incorrect key, or when wants to call to attention to something. The OP seems to get a beep for an unexpected scenario. – leonbloy – 2012-06-05T16:32:48.390

2

I was just fighting with this problem myself. According to a thread I found on nabble, the beep is caused by showmatch being on and vim trying to find and jump to the opening < for the > you're typing.

This can either be fixed by setting noshowmatch, or adjusting matchpairs so that it doesn't match < and >

Mike Gossmann

Posted 2012-06-04T17:01:44.587

Reputation: 791

1

Command for > in VIM:

> : Shift right (indent)

Vic Abreu

Posted 2012-06-04T17:01:44.587

Reputation: 399

Yes, and if this happened in visual mode then maybe it would be because I couldn't indent or something like that. But this happens on insert mode. – Hibiscus – 2012-06-05T16:18:07.877