When I use vi, depending on the change I make, it will repeat the change over and over again when I hit Esc.

For example, if I go into a file and insert "6" then hit Esc, the program will suddenly show "666666666".

I tried experimenting and figured out that the same change will result in the same number of repeats. (So inserting "xyz" will always repeat n number of times)

It doesn't appear to be related to a certain character, character type, or sequence of characters. The repeat has been anywhere from one to hundreds of times. The entire change matters, so typing "6" is different from hitting delete then typing "6". (But typing delete then "xyz" will cause a repeat).

If I hit Esc and the repeat happens, then I go back to insert mode and get rid of the repeat, it won't happen again because the delete or backspace presses count as a different change.

This occurs enough that I can guess other changes that will cause it to repeat. It only gets really inconvenient when the repeat happens hundreds of times and it takes 5 minutes to delete them.

I am using the server version of Ubuntu 11.04 (I know it's not supported, but I doubt it is related to this issue) and vim 2:7.3.035+hg~8fdc12103333-1ubuntu7.

Has anyone heard of this happening before? Am I accidentally triggering this with a stray keystroke? Is there a setting I need to change?

  • If you're on 11.04, and using the Ubuntu repositories, the chance is that you're on a very old version of Vi/Vim, and as such need to test with a newer Vi version. The problem is, you're stuck on the now obsolete and unsupported 11.04. Have you been able to replicate this on a 16.04 machine or any other newer, supported Server version? – Thomas Ward Nov 27 '17 at 16:18
  • I haven't tried it. I'll do that next. – khm Nov 29 '17 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.