Not so much a bug as a comment regarding the FAQ, which mentioned that examples of how to map special keys in Vim without requiring xterm-keys would be welcome.
From the following:
I came to this "simplified" solution:
set ttimeoutlen=100 if &term == 'screen' set <F25>=^[[A map <F25> <C-Up> map! <F25> <C-Up> set <F26>=^[[B map <F26> <C-Down> map! <F26> <C-Down> set <F27>=^[[C map <F27> <C-Right> map! <F27> <C-Right> set <F28>=^[[D map <F28> <C-Left> map! <F28> <C-Left> endif
For some reason, Vim receives
cat -v receives them the other way around, in the same session. No idea why, but this works. There are no terminfo keycode names we can set directly for
<C-Up> and friends, but it's important that we not simply map the escape sequence to the final
map, because that would result in an annoying delay when pressing <Esc> to leave insert mode. Specifying
ttimeoutlen allows us to greatly reduce the length of time Vim waits after receiving an
<Esc> code before deciding it wasn't one of these combinations.