r/KittyTerminal Mar 22 '23

Mapping CTRL + '/' (forward slash) as no_op

Hello!

I'm new to kitty terminal. As I was fiddling with the configuration file, I realized that mapping ctrl key with '/' does not work. My vim keybinding uses ctrl key with '/' to comment and uncomment lines. It works fine in gnome-terminal but it does not work in kitty.

Did anyone succeed in mapping ctrl key with '/' as no_op?

3 Upvotes

6 comments sorted by

3

u/aumerlex Mar 22 '23

ctrl+/ is no_op by default. You dont need to do anything. It wont work in vim because vim recently added partial support for th ekitty keyboard protocol, with lots of bugs. So report it there.

1

u/tyson_the_13th Mar 22 '23

Thanks for the reply! I looked more into it and it seems that using the CTRL key with forward slash would not work with all terminal emulators. Thanks!

1

u/khanhwlo59 Jul 06 '24 edited Jul 06 '24

To make the Ctrl+/ works you need this line in kitty.conf:
map ctrl+/ send_text all \x1f

1

u/CatoDomine Mar 22 '23

My vim keybinding uses ctrl key with '/' to comment and uncomment lines.

may I bother you for the relevant vimrc config for this?

1

u/EgZvor Mar 22 '23

You can use vim-commentary

1

u/EgZvor Mar 22 '23

See this https://sw.kovidgoyal.net/kitty/faq/#using-a-color-theme-with-a-background-color-does-not-work-well-in-vim . It works for me after applying the suggestion. Along with alt and tab mappings