You are not logged in.
Hi,
I'm happily using urxvt(c) for my day-to-day terminal business. Because I don't want to install the urxvt terminfo in every machine I ssh to, I configured it to use xterm keycodes:
URxvt.termName: xterm-256color
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Home: \033[H
URxvt.keysym.End: \033[FIt works nice most of the time. The only issue I noticed is that Home and End don't behave correctly in vim, they do something that is not jumping to the start/end of the line. :set term=xterm won't help. cat -v gives the same codes in xterm and in rxvt, $TERM is set properly, the keys work correctly in zsh and bash; Just vim behaves odd.
Last edited by krumelmonster (2019-01-04 12:25:00)
Offline
This is in my Xresources, please don't ask me where I stole that from ("I don't recall" ;-)
URxvt*keysym.Home: \033OH
URxvt*keysym.End: \033OF
URxvt*keysym.S-Home: \033[1;2H
URxvt*keysym.S-End: \033[1;2F
URxvt*keysym.M-Home: \033[1;3H
URxvt*keysym.M-End: \033[1;3F
URxvt*keysym.S-M-Home: \033[1;4H
URxvt*keysym.S-M-End: \033[1;4F
URxvt*keysym.C-Home: \033[1;5H
URxvt*keysym.C-End: \033[1;5F
URxvt*keysym.S-C-Home: \033[1;6H
URxvt*keysym.S-C-End: \033[1;6F
URxvt*keysym.M-C-Home: \033[1;7H
URxvt*keysym.M-C-End: \033[1;7F
URxvt*keysym.S-M-C-Home: \033[1;8H
URxvt*keysym.S-M-C-End: \033[1;8FOffline
Thanks alot. These work in vim and bash, however, not in zsh. There it will print something like '\nH' (which will result in "H command not found").
Also, the cat -v output now differs between xterm and urxvt.
Edit: It really confuses me that with my above configuration, the output of cat -v is *identical* for urxvt and xterm. I assume that the keycodes are correct but somehow vim detects that this is a different terminal…
These codes worked, I only had to add
bindkey "${terminfo[khome]}" beginning-of-line
bindkey "${terminfo[kend]}" end-of-lineto my .zshrc
Last edited by krumelmonster (2019-01-04 12:26:05)
Offline