OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

Keycodes are incompatible with rxvt #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I'm currently testing the mintty-0.8-beta1-msys.zip to see if it suits my 
project, but when I run VIM inside the MSYS environment, I found that the old 
RXVT oriented .inputrc and .vim key mapping doesn't work anymore.

This problem originally exists in MSYS when using Rxvt as a GUI frontend, and 
could be solved by the following configuration files:

~/.inputrc:-------------------------------------------------------------

"\e[3~": delete-char

# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# kvt
"\e[H": beginning-of-line
"\e[F": end-of-line

# rxvt and konsole (i.e. the KDE-app...)
"\e[7~": beginning-of-line
"\e[8~": end-of-line

# VT220
"\eOH": beginning-of-line
"\eOF": end-of-line

~/.vimrc: ---------------------------------------------------------------

map  <Esc>[7~ <Home>
map  <Esc>[8~ <End>
imap <Esc>[7~ <Home>
imap <Esc>[8~ <End>

But, now with MiniTTY seems the mapping of keys has changed, MiniTTY is a 
competing environment for replacement of the buggy RXVT, but I need answers to 
solve this problem.

Best Regards,
Martin

Original issue reported on code.google.com by dynasp...@gmail.com on 23 Jul 2010 at 6:18

GoogleCodeExporter commented 9 years ago
Yep, mintty sends xterm keycodes rather than rxvt keycodes, because xterm 
pretty much is the de-facto standard these days. Please see the KEYCODES 
section of the mintty manual for details.

Home, End, and Delete should work out-of-the-box both in bash/readline and in 
vim, i.e. you shouldn't need any special mappings in .inputrc and .vimrc. Works 
for me anyway.

Note though that vim by default operates in vi compatibility mode where it 
refuses to recognise any keys that didn't exist on whatever machine vi was 
originally written for. Simply creating an empty ~/.vimrc cures that though.

You should also check that TERM=xterm. Mintty automatically sets that at 
startup, but perhaps you've got something in your startup scripts that changes 
it.

Original comment by andy.koppe on 23 Jul 2010 at 11:57

GoogleCodeExporter commented 9 years ago
Hope you got this sorted. Mintty isn't going to switch to rxvt keycodes though.

Original comment by andy.koppe on 26 Jul 2010 at 5:27