Control-/ is broken in vim-gtk and vim-gnome

Bug #534124 reported by Scott Bronson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: vim

vim-gtk and vim-gnome mistakenly convert Control-/ to plain "/", making it impossible to map Control-/ to anything.

console vim, vim-lesstif, and most other platforms treat Control-/ as the same as Control-_ (due to terminal legacy). The all other platforms just pass through Control-/ unmolested.

Here's how to test, expected behavior first, actual behavior second:

- fire up console vim
- hit "i" to enter insert mode
- hit Control-V Control-/. Notice how "^_" is printed. Excellent!

- fire up gvim
- hit "i" to enter insert mode
- hit Control-V Control-/. Notice how "/" is printed. Not good.

This is on stock Karmic, Vim 7.2 patches 1-245.

Revision history for this message
Will Gray (graywh) wrote :

Well, ctrl-/ isn't a real character. The fact that your terminal sends a ctrl-_ when pressing ctrl-/ is not vim's problem. However, gvim does interpret ctrl-7 as a ctrl-_, so use that instead.

Revision history for this message
Scott Bronson (bronson) wrote : Re: [Bug 534124] Re: Control-/ is broken in vim-gtk and vim-gnome

Maybe I wasn't clear. The bug is that gtk and gnome vim won't detect
control-/. When you type ctrl-/ they produce plain /.

All other vims that I've tried support ctrl-/ just fine, even the terminal!
That seems like a bug doesn't it?

On Apr 30, 2010 2:21 PM, "Will Gray" <email address hidden> wrote:

Well, ctrl-/ isn't a real character. The fact that your terminal sends
a ctrl-_ when pressing ctrl-/ is not vim's problem. However, gvim does
interpret ctrl-7 as a ctrl-_, so use that instead.

--
Control-/ is broken in vim-gtk and vim-gnome
https://bugs.launchpad.net/bugs/534124
You receive...

Revision history for this message
Will Gray (graywh) wrote :

What do you mean by "won't detect"? And what do you mean by other vims supporting it?

Revision history for this message
Scott Bronson (bronson) wrote :

I mean:

In the terminal: Control-/ produces Control-_. Vim can detect that it's
different from just pressing the / key and I can bind an action to it.

In vim-gtk, Control-/ just produces /. Vim can't detect control-/, so I
can't bind to it.

Strange, no?

Revision history for this message
Will Gray (graywh) wrote :

Vim detects that character / (0x2f) is different from character ctrl-_ (0x1f). Your terminal is the one that produces the ctrl-_ when holding control and pressing /. Regardless, you cannot map ctrl-/ in either case--you map ctrl-_. GVim and most terminals (e.g. xterm, gnome-terminal, konsole) can make a ctrl-_ by holding ctrl and pressing 7 or _. If that's not good enough, get on the vim-dev mailing list and complain about it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.