Normally, hitting Shift d erases everything from the cursor to the end of the line, but sometimes it just deletes one character backwards.

This has happened more than once, but a recent example is that I was experimenting with the c operator, because it can be pretty nifty in terms of editing text and automatically going into insert mode.

Something that I pressed in the process triggered a change in behavior with the Shift d command, and it would be interesting to know what was going on.

I'd give more information if I could.

  • Can you run :map and see if you have any mappings that start with a capital 'D'?
    – Friedrich
    Apr 24, 2023 at 14:37
  • 1
    The command to run is :map D Apr 24, 2023 at 14:43

1 Answer 1


I suspect that you miss type X for D. Both x and d are close the keyboard.

X deletes the previous character.

  • 1
    Yeah, i always thought it was related to X (that's a great answer, solves this mystery), and it also explains why future instances of D appear to do the same thing after i make that mistake. Whoops!
    – user8919
    Apr 24, 2023 at 15:25
  • Thanks for the feedback :-) Apr 24, 2023 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.