On Sat, 4 Oct 2014 12:37:45 -0700
"/#!/JoePea" <[email protected]> wrote:

> Hmmm, yep. I just tested. gvim and MacVim both don't differentiate
> tab and ctrl_i!
> 
> */#!/*JoePea
> 
> On Sat, Oct 4, 2014 at 12:34 PM, Ingo Karkat <[email protected]>
> wrote:
> 
> > On 04-Oct-2014 15:43 +0200, Bram Moolenaar wrote:
> >
> > > Not sure what your problem is.  This works just fine:
> > >
> > > imap <C-I> <Up>
> > >
> > > It does require gvim, since a terminal doesn't make a difference
> > > between Tab and CTRL-I.

This, Bram, is exactly the thing I have been arguing at you for years
now. You keep deflecting this down to make it sound like the terminal's
fault, when we both know it isn't.

You and I both know full well that terminals don't distinguish them; I
accept that. That's why I designed a better system, in cooperation with
Thomas Dickey (the current xterm author). I have a terminal now that
distinguishes any and all possible combinations of keypresses, and
programs that understand it. Most of the programs I run regularly now
do understand this - I can type Ctrl-I and Ctrl-Shift-A and so on
absolutely fine. Vim is one of the few programs remaining that doesn't.
(see attached screenshot-1).

Vim - I am talking specifically about vim here - conflates the possible
keypresses of Ctrl-I vs Tab, of Ctrl-M(or is it Ctrl-J I forget) and
Enter, of Ctrl-H and Backspace. It further conflates Ctrl-S and
Ctrl-Shift-S, etc etc... And lets not get started on Unicode vs.
Alt-letters.

Blaming terminals for this is just deflecting from the fact that vim's
internals aren't sufficiently generic to represent the possible
keypresses, regardless of how they arrive. That 1980s-style terminals
couldn't do it is one thing but that is no excuse that a 2014-style
GTK/Win32-driven GUI program cannot.

You cannot reply to the original poster of this email and claim that it
works, until you can perform the following test IN GVIM to demonstrate
it so.

  :imap <Tab> You typed tab
  :imap <C-i> You typed Ctrl-I
  :imap <C-S-I> You typed Ctrl-Shift-I

Then press all three keypresses and show it inserting different text.
Do this in gvim, so as to avoid any reason to blame the terminal. For
me, right now in GTK2-driven gvim, I get the Ctrl-Shift-I version all
three times. (see attached screenshot-2)

Only when that works can you reply to the OP and say "this works".

-- 
Paul "LeoNerd" Evans

[email protected]
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui