1

In Vim, when I'm in Insert mode and hit d, the cursor moves back one spot for a second, then jumps back to behind the letter just typed. This is quite distracting when typing texts.

It looks like Vim is expecting a command because unlike other keystrokes, the d appears in the bottom right corner of the screen for a second.

However, according to :help the d only triggers an action in Normal mode, where it means delete. Would anyone know what d does in Insert mode and whether it's possible to avoid this behavior, e.g. through remapping?

1

Sounds like you've got an insert mode mapping that begins with a d, and Vim is waiting to see if you're typing that mapping or something else. To see what the mapping is, and where it was set, try the command:

:verbose imap d
3
  • Thanks! Strangely, I get to see mappings that don't have a d in them at all: i deoplete#auto_complete([]) * : "<C-Y>" Last set from ~/.vimrc line 51 i deoplete#close_popup() * : "<Tab>"<Space> Last set from ~/.vimrc line 48 Jun 22 '20 at 16:07
  • @TimothyRoes Those mappings do have a d in them! They are mappings for deoplete#... i.e. when you type deoplete#..., the bit after the * will be entered instead. You should take a look at lines 48 and 51 of your .vimrc, because it looks as though the mappings there are broken/missing their lhs (i.e. their triggers).
    – Rich
    Jun 22 '20 at 21:22
  • Thanks, that totally fixed it. The syntax was wrong. Deoplete :help was rather terse on this point, but referring to the general vim :helpI managed to understand :map-expr . Jun 23 '20 at 7:18

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.