Terminal TAB key and character

Štěpán Němec stepnem at gmail.com
Sat Jul 3 13:18:41 CEST 2010

Vegard Øye <vegard_oye at hotmail.com> writes:

> On 2010-07-03 12:23, Štěpán Němec wrote:
>> Are you saying that when you do C-h c C-i and C-h c <tab> in emacs -nw
>> under Windows, you get different results?
> Yes. The first is bound to `vimpulse-jump-forward', the second to
> `indent-for-tab-command'. And when I jump back three times with
> C-o C-o C-o, I can jump forwards with C-i C-i C-i, but not with
> <tab> <tab> <tab>.
>> How does emacs -nw on Windows even look like?
> Spartan. :)
> I'm attaching a 11 kB PNG file showing Emacs under cmd.exe.
> Let's see if it gets through.
>> If there's a way to somehow re-program a text terminal to send
>> something different for <tab> and C-i, then I'm yet to hear about it
>> (it might be possible, I'm no expert on terminals), but you
>> certainly can't rely upon such behaviour.
> And sure enough, Vim does not. Vim treats <Tab> and CTRL-I as the same
> key. In vanilla Vim, you can go to a newer jump position with <Tab>;
> and in my Vim, where I rebind <Tab> to <Esc>, I can exit Insert mode
> with CTRL-I.

Yeah, that's an oft-mentioned Vim whim -- for some reason Bram decided
to go with Tab key == Tab character even in the GUI (gvim).

More information about the implementations-list mailing list