1

vim is doing something that I can't quite figure out. When I leave insert mode, and navigate with j/k/h/l within a second of doing so, vim appends the contents of the ". buffer.

On a tip from How to start vim without executing /etc/vimrc? I am starting vim with vim -u NONE testfile, which should mean I've disabled any weird configuration I might have.

Here is what I do to show the problem:

  1. Open up a new, empty file with with vim -u NONE testfile.

  2. iTEST<esc>. I've just inserted the text TEST and exited insert mode.

  3. :reg will show, among other things, ". TEST. <enter> will close the register view.

  4. A<enter>Now I type this<esc>k and TEST is inserted at the end of the line I just typed! My document now looks like:

    TEST Now I type thisTEST

    and :reg shows ". ^@Now I type thisTEST

But If I had let 2 seconds pass between the <esc> and the k, the extra text would not have been inserted. What is going on?

edit: This was a GNU screen issue. I've posted my solution below.

1 Answer 1

3

It turns out this is a GNU screen issue. See https://unix.stackexchange.com/questions/8439/gnu-screen-makes-vim-esc-key-slow

Within screen, C-a : maptimeout 0 solves this. I'll be adding it to my .screenrc.

Sanity preserved.

Your Answer

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

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