2

Using GVIM, I sometimes hold ctrl-d to page-down a lot, and I let go of ctrl first (unintentionally and momentarily) and cause a line to be deleted b/c an additional 'd' without 'ctrl' is sent. What is the expected behavior on different operating systems? I remember testing this a while back and seeing MacOS not perform a repeat of 'd', but now I see it does. Is there a standard resolution to this issue? Is it a GVIM issue?

Glorfindel
  • 211
  • 1
  • 3
  • 11
nachum
  • 131
  • 2
  • 2
    This doesn't answer the question in the title, but a possible work around for your specific issue could be to use ctrl-f to page down instead of ctrl-d. That way, the worst case scenario if you accidentally let go of the control key is that you find the next 'f' on the line. – Pak Mar 27 '18 at 17:28

1 Answers1

1

I don't think it's GVim. This happens in the Linux terminal too. It may be OS-dependent, but I suspect it's more likely that you can count on the next key repeat of d to be interpreted as d and not CtrlD.

What to do? Pak's CtrlF suggestion is a good one (:help pagedown). Faster, too. You could also consider binding CtrlJ, which would leave you moving down one line at a time if you lift up the wrong key. (I use that to move between splits, but it might work for you).

Rich Churcher
  • 201
  • 2
  • 6