How can I record a “(” in a macro in vsVim?

久未见 提交于 2019-12-23 20:12:31

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/29993431/how-can-i-record-a-in-a-macro-in-vsvim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!