I'm using a French keyboard, and <C-]> to access to a tag definition is cumbersome. You need AltGr+] to access the ] character, so the whole thing is 3 keys pressed at the same time: Ctrl+AltGr+].

I want to remap it to Ctrl+), because ) and ] are on the same key, but ) is accessible directly. This is what I tried:

nnoremap <C-)> <C-]>

This doesn't work. The cursor moves as if I had just pressed ). Any idea on why it doesn't work, or how I could debug that?

  • 2
    The keycode terminals generate for C-( is the same of (. The reason and how to do solve your problem with XTerm.
    – Quasímodo
    Feb 11, 2021 at 17:23
  • 2
    – D. Ben Knoble
    Feb 11, 2021 at 17:26
  • Thanks for the input. I'm using gnome-terminal, not xterm, but I don't know if there's a way to use some extended mappings there.
    – liberforce
    Feb 12, 2021 at 11:13
  • No, I'm afraid Gnome-terminal does not have advanced features. Xterm may look crappy at first, but it has many, many customizable features, including the keycodes it sends in response to key presses.
    – Quasímodo
    Feb 12, 2021 at 23:02


Your Answer

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

Browse other questions tagged or ask your own question.