This is the problem. I want to use in my mapping but it causes a bell to ring every time I press on it, no matter what I mapped it to.

For example:

nmap <c-/> y

I am on nvim-qt.

PS tried all of these and still happens:

set noerrorbells visualbell t_vb=
set noeb vb t_vb=
autocmd GUIEnter * set visualbell t_vb=
  • Update, mapping BS and ctrl / in terminal contradict where ctrl / interprets as BS. – eyal karni Dec 19 '19 at 0:00

On my setup (Vim 8.1.2102, Ubuntu, Gnome-Terminal, german keyboard), <C-/> is equivalent to <C-7> and <C-_>.

I opened a new buffer, changed to insert mode and hit <C-v> followed by <C-/> and it inserted ^_ (displayed in blue). The same input is created for <C-v><C-7> and <C-v><C-_>.

So I used the following:

nmap <C-_> p

Now <C-_> acts like p. But also <C-/> and <C-7> works like p.

| improve this answer | |
  • I set allowrevins with no apparent difference – eyal karni Oct 12 '19 at 15:40
  • @eyalkarni Reevaluated my test and rewrote the answer. Lessons learned: Reevaluate the test case in a new Vim before writing an answer. Sorry for the confusion. – Ralf Oct 12 '19 at 16:30
  • The environments are very much different. It was a good try. – eyal karni Oct 12 '19 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.