Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes, while using vim (no matter, on remote machine or the local one), my arrow keys suddenly stop reacting. I know, a true vimmer should use "hjkl" instead, but the question is different.

I've noticed that if I'm sending application to background, using ^Z, and then calling it back, arrow keys are working again.

Have you noticed such behavior? Can somebody explain from the technical point of view, what is going on behind the scenes?

By the way, even OS's are different, MacOS, debian, FreeBSD.

share|improve this question

migrated from programmers.stackexchange.com Sep 27 '11 at 15:03

This question came from our site for professional programmers interested in conceptual questions about software development.

1 Answer 1

up vote 3 down vote accepted

For historical reasons, the arrow keys can work in either "ANSI" or "application" mode. vim uses terminfo which generally specifies the application mode for arrow keys.

For some reason you're doing something to reset it to the default ANSI mode. Are you perhaps resetting the terminal while still in vim? When you press ^Z and then fg again vim will again activate the application mode.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.