I have tmux set up with $TERM
being set to screen-256color
correctly. This works fine, and colours are set correctly, however it prevents me from sending HOME
and END
keys to the terminal, which are instead printed as F\n
and H\n
.
I should add that home appears to work in irssi, but not vim. Home seems to send (According to Ctrl+v <HOME>
), ^[OH
It may be worth adding that I am well aware of the ability to use ^
and $
to move to the start and end of the lines, however $
does not go to the end, rather the penultimate character, and I prefer to use HOME
and END
(as I can under other $TERM settings).
Can anyone explain why this is, and how I can fix it?
As a part-way fix, I set the vim keybindings to map a <Home>
and <End>
keypress to <Esc>OH
and <Esc>OF
. This isn't ideal, but works for the moment! See https://github.com/jvc26/dotfiles/blob/master/.vimrc for details.
Thanks!