putty + vim alt key interpretation

662 views
Skip to first unread message

madiyaan

unread,
May 19, 2008, 9:30:50 PM5/19/08
to vim_use
Hello:

Putty sends alt+key as Esc+key, and vim interprets that as a regular
escape + button (not meta + button).

Is there a way someone has figured out how to use putty + vim such
that vim recognizes alt key as meta and not escape? (Sending alt as
meta is one of the items in the wishlist of Putty and wont be done
anytime soon, which is why I am asking this here).

Thank you in advance.

Regards,

Sadarax

unread,
May 19, 2008, 9:49:12 PM5/19/08
to vim...@googlegroups.com
Have you checked your Putty configure? Also, have you tried both the left and the right alt keys? I seem to remember that one of the alt keys worked properly for me once I configured Putty correctly.
--
How sad it would be to live a life less wonderful, if only because one were afraid of a little hard work. If you shy away from challenges, you shy away from some of the greatest achievements in life.

tocer

unread,
May 19, 2008, 10:19:50 PM5/19/08
to vim...@googlegroups.com

Tony Mechelynck

unread,
May 20, 2008, 11:59:54 AM5/20/08
to vim...@googlegroups.com

1. Make sure that your 'term' settings are correct (i.e., that ":set
termcap" reflects what your putty terminal sends and expects). You may
want to check the following:

:echo $TERM
:verbose set term?
:set termcap

Interpreting the latter requires some technical knowledge though.
|i_CTRL-V| may help you.

2. Set your timeouts so that a multibyte keycode can be told apart from
Esc + something typed by hand. How fast is your putty line, how fast and
how slow can you type? The following

:set timeout timeoutlen=3000 ttimeoutlen=200

assumes the following:

- putty sends bytes faster than five per second when they are generated
by a single keypress
- you won't type characters that can be confused with a multibyte
charcode with less than a fifth of a second's interval between them
- you won't type the successive characters in the {lhs} of a multibyte
mapping with more than three seconds between them.

See ":help 'timeout'" etc.


Best regards,
Tony.
--
The Characters and incidents portrayed and the names used are fictitious and
any similarity to the names, characters, or history of any person is
entirely
accidental and unintentional.
Signed RICHARD M. NIXON
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

Reply all
Reply to author
Forward
0 new messages