Why don the Home and End keys work in rxvt and vim?
This is because rxvt’s terminal emulation uses different escape codes for these two keys. This sample ~~/.inputrc file solves this issue: set completion-query-items 100 set completion-ignore-case on set show-all-if-ambiguous off set input-meta on set output-meta on set convert-meta off set bell-style none “\e[2~~”: paste-from-clipboard “\e[3~~”: delete-char “\e[5~~”: beginning-of-history “\e[6~~”: end-of-history “\e[7~~”: beginning-of-line “\e[8~~”: end-of-line Also, you need to set up your ~~/.vimrc to enable the Home/End keys in ViM: set nocompatible set backspace=2 syntax on map