User:Sleeping

From ArchWiki

Set up Ctrl+/ with XTerm

When using vim, I like to use Ctrl+/ to comment out lines. I added the following to my .vimrc:

nmap <C-_> gcc
vmap <C-_> gc

This worked with Konsole, but it didn't work with Xterm. Using showkey -a in Konsole, pressing Ctrl+/ shows:

^_       31 0037 0x1f

To send the same keycode with XTerm, use the following in .Xresources:

XTerm.vt100.translations: #override \n\
    Ctrl <Key>slash: string(0x1f) \n\