[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return]
From: |
Daniel Mendler |
Subject: |
Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return] |
Date: |
Sun, 27 Jun 2021 11:11:06 +0200 |
On 6/26/21 4:02 PM, Stefan Monnier wrote:
>> + (define-key map [tab] #'corfu-complete)
>
> Please avoid binding `tab`: the `tab` event (only generated under GUIs)
> is supposed to be remapped to the TAB char-event (aka `C-i`) and this is
> what you should bind to if you want your binding to work both under ttys
> and GUIs.
>
> More importantly, if you bind to `tab` than this binding will take
> precedence over all other bindings to TAB, even those in keymaps that
> have higher precedence.
>
> The same holds for `return` vs RET, and `escape` vs ESC.
Hello Stefan,
I am aware of the unfortunate implications of these bindings.
Originally I avoided these bindings for the exact reasons you mention
and I hoped I could do without those (only binding RET/TAB and
remappings). However I have to use these keys since Org-mode seems to
override these keys too. Otherwise my keymap will not take precedence
over the Org-mode keymap.
Daniel