Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I use my arrow key to move my cursor left, I am unable to move it back to the end of the line. For instance:

If I type:

$ echo hello wordl_ 

Then if I move the cursor left to fix typo

$ echo hello wor_l

I am unable to move the cursor back to the end of the line and the "l" will remain. So I then have to enter vi mode ESC,right, a to get to the end of the line. I am on a mac and bash is my shell.

Does anyone know what is causing this and how to fix it?

Am I the only one who has this problem??

share|improve this question

migrated from Dec 12 '12 at 11:14

This question came from our site for professional and enthusiast programmers.

Seems like you use vi mode. Does this help?… – Evert Dec 11 '12 at 23:33
@Evert Thanks ESC, A is useful. But I'd rather not have to ESC or use a 3 key combo. I was on someone's terminal once and didn't have this issue – jermel Dec 11 '12 at 23:41
@jermel well, the other person whose terminal you used probably wasn't using vi mode. It's not an "issue", it's a preference. Maybe you set it by mistake? Check your ~/.inputrc. – Celada Dec 12 '12 at 1:21
@Celada thanks!! sigh... that was my problem – jermel Dec 12 '12 at 1:29
@Celada well done, could you post your comment as an answer so the question can be marked as answered please? – terdon Dec 12 '12 at 13:25
up vote 2 down vote accepted

This is a feature of using vi key bindings set -o vi. To solve my problem I switched to emacs key bindings

$ set -o emacs
share|improve this answer

Your Answer


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.