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:
Open up a new, empty file with with
vim -u NONE testfile.iTEST<esc>. I've just inserted the textTESTand exited insert mode.:regwill show, among other things,". TEST.<enter>will close the register view.A<enter>Now I type this<esc>kandTESTis inserted at the end of the line I just typed! My document now looks like:TEST Now I type thisTESTand
:regshows". ^@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.