2

I have d mapped to "_d and <M-d> (== Alt-d or Option-d) mapped to d. For some reason, this mapping doesn't work reliably in a macro. The problem persists even if I delete my .vimrc and all plugins. To try out what I'm seeing, :nnoremap <M-d> d, then put the following text in a buffer:

foo bar1 bar2 bar3 bar4

Here's a minimal example that works:

qqw<M-d>wq@q

Here's a tiny change that makes the macro not work (fb instead of w):

qqfb<M-d>wq@q

The latter macro puts the cursor on bar3 but then it beeps instead of deleting the word. Any idea what's happening here?

Edit to add this is happening in version 7.4 and both Windows and MacVim have the same problem. I originally thought it was related to the macmeta setting, but I don't think that's the case since it happens in Windows gvim as well.

1
  • Strange. I can reproduce this (Vim 7.3.823), also with :normal fb<M-d>. May be a bug in Vim; please add your Vim version. Jan 3, 2014 at 22:19

1 Answer 1

1

It's a bug that has to do with handling multibyte characters after a seek command (f/t/F/T). Fixed in 7.4.374: https://code.google.com/p/vim/source/detail?r=f59c4bf0ac3b525f703cafba9a9cb0aeb3cc7745

Your Answer

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

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