如何在vsVim的宏中记录“("? [英] 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?
(注意:我正在使用 Visual Studio vsVim插件)
我不记得确切的宏了,但是它遵循了这样的思路:
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
应该在每第5行添加.EndInit();
,但是输出仅为.EndInit
.
It was supposed to append .EndInit();
on every 5th line but the output was just .EndInit
.
请注意,在没有resharper插件的其他计算机上 ,此问题不会发生!
Note that on other machine without the resharper plugin, this problem doesn't occur!
推荐答案
这里最可能的问题是R#正在吃(
击键.这意味着它永远不会进入VsVim,因此不会被记录为宏的一部分.
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.
以下问题跟踪清理此问题.它还将包含针对R#的修复程序.
The following issue tracks cleaning this up. It would include fixes for R# as well.
这篇关于如何在vsVim的宏中记录“("?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!