Search code examples
visual-studioresharpervsvim

How can I record a "(" in a macro in vsVim?


I'm trying to record a macro that will type a small chunk of text that contains a parenthesis "(", whenever I try to play the macro it doesn't type the "();" at the end of the line.

My guess is that parenthesis in a macro may have some special meaning but in my case, I just wanna type in "(".

What's breaking my macro? How can I get the parenthesis to be typed?

(note: I'm using the Visual Studio vsVim plugin)

Edit: I can't remember the exact macro anymore, but it went something along the lines of this:

q a 5 j ^ 2 w i .EndInit(); esc q

It was supposed to append .EndInit(); on every 5th line but the output was just .EndInit.

Note that on other machine without the resharper plugin, this problem doesn't occur!


Solution

  • The most likely issue here is that R# is eating the ( keystroke. This means it never makes it to VsVim and hence doesn't get recorded as part of the macro.

    The following issue tracks cleaning this up. It would include fixes for R# as well.

    https://github.com/jaredpar/VsVim/issues/1393