visual-studio ReSharper 打破了“查找”和“在文件中查找”的键盘快捷键

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2789095/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:56:11  来源:igfitidea点击:

ReSharper breaks keyboard shortcuts for "Find" and "Find in Files"

visual-studiokeyboard-shortcutsresharper

提问by David Vidmar

I have been using ReSharper for some time and since I can remember every time I install Resharper, it's default keyboard shortcuts override Visual Studio's Ctrl+ Fand Ctrl+ Shift+ Ffor "Find" and "File in Files". It happend with R#3, 4, 5 in VS 2005, 2008 and 2010.

我已经使用 ReSharper 有一段时间了,因为我每次安装 Resharper 时都记得,它的默认键盘快捷键会覆盖 Visual Studio 的Ctrl+FCtrl+ Shift+,F用于“查找”和“文件中的文件”。它发生在 VS 2005、2008 和 2010 中的 R#3、4、5 中。

I don't have any ideas why would that be a good idea, but if this would bug it would be fixed by now.

我不知道为什么这会是一个好主意,但是如果这会导致错误,那么现在就可以修复。

Does this even happen to others? I checked around our company and I'm not alone.

这甚至发生在其他人身上吗?我检查了我们公司,我并不孤单。

回答by Aleksandar Vasi?

I have the same problem with Serbian keyboard - which is the same as Slovenian. Someone mentioned that the shortcut for the GoToContainingDeclarationfeature that overrides 'Find' is Ctrl+[. Well, guess what - on our keyboards, [is typed as AltGr+F. Most likely that is why Resharper assigns the command that would normally go to Ctrl+[to Ctrl+F.

我对塞尔维亚语键盘有同样的问题 - 与斯洛文尼亚语相同。有人提到GoToContainingDeclaration覆盖“查找”的功能的快捷方式是Ctrl+ [。好吧,猜猜看 - 在我们的键盘上,[输入的是AltGr+ F。很可能这就是为什么 Resharper 将通常会转到Ctrl+的命令分配[Ctrl+ 的原因F

Now the workaround (if not the solution):

现在解决方法(如果不是解决方案):

  • Reset the VS keyboard shortcuts (Tools>Options>Keyboard)
  • Temporarily set US keyboard
  • Set Resharper keyboard shortcuts (Resharper>Options>Keyboard&Menus)
  • Go back to your keyboard of choice
  • 重置 VS 键盘快捷键(工具>选项>键盘)
  • 暂时设置美式键盘
  • 设置 Resharper 键盘快捷键(Resharper>Options>Keyboard&Menus)
  • 返回您选择的键盘

回答by Gico

as @cashmere said: Go to Open Tools->Options->Environment->Keyboard.

正如@cashmere 所说:转到打开工具-> 选项-> 环境-> 键盘。

In Show Commands containing enter: GoToContainingDeclaration

在包含输入的显示命令中: GoToContainingDeclaration

Under shortcuts for the selected command you will see Ctrl+ F. Now you may change the shortcut or remove it.

在所选命令的快捷方式下,您将看到Ctrl+ F。现在您可以更改快捷方式或将其删除。

Now you just need to check if edit.findcommand has assigned Ctrl+ Fshortcut. Now it should work. At least it did for me.

现在您只需要检查edit.find命令是否已分配Ctrl+F快捷方式。现在它应该可以工作了。至少对我来说是这样。

回答by toxaq

Yep, this has just happened to me after a reinstall. I was using Vs2k8. Realised I didn't have resharper 4.5 installed. Closed VS, ran install, selected the same settings as I had been using for the last 8 months (VS settings) and then restarted VS. Now no Ctrl+ For Ctrl+ Shift+ F! Very odd.

是的,我重新安装后刚刚发生这种情况。我使用的是 Vs2k8。意识到我没有安装 resharper 4.5。关闭 VS,运行安装,选择与我过去 8 个月使用的相同的设置(VS 设置),然后重新启动 VS。现在没有Ctrl+FCtrl+ Shift+ F!很奇怪。

UPDATE:Well I found out what it was. The Find box had been relocated behind the Windows taskbar. I had to move the taskbar to the side of the screen, so that I could drag the find box back into the usable window space. No idea if this was a Resharper caused change but there was a direct correlation to the install.

更新:嗯,我发现它是什么。“查找”框已重新定位在 Windows 任务栏后面。我不得不将任务栏移到屏幕的一侧,以便我可以将查找框拖回可用的窗口空间。不知道这是否是 Resharper 引起的更改,但与安装有直接关系。

回答by cashmere

Open Tools->Options->Environment->Keyboard and Press Reset for default keyboard shortcuts

打开工具->选项->环境->键盘并按重置为默认键盘快捷键

回答by Omer Raviv

No, never happened to me (I'm using Resharper 5).

不,我从未发生过(我使用的是 Resharper 5)。

If you check ReSharper's keymaps, you'll Ctrl+ Fis not listed.

如果您检查 ReSharper 的键盘映射,您将Ctrl+F未列出。

回答by Igal Tabachnik

I've been using ReSharper since v2.5, and this never happened to me as well. Perhaps sometime ago the keys got mixed up. Try to reset your key bindings to default, and after that apply one of the ReSharper key schemes (VS or IDEA).

我从 v2.5 开始就一直在使用 ReSharper,这也从未发生在我身上。也许前一段时间,钥匙弄混了。尝试将您的键绑定重置为默认值,然后应用 ReSharper 键方案之一(VS 或 IDEA)。

If this still happens, check maybe if your keyboard layout is that of US, or maybe something else...

如果仍然发生这种情况,请检查您的键盘布局是否为美国键盘布局,或者其他...

回答by Qhori

Resharper - Options - Keyboard - Keyboard Scheme - None

Resharper - 选项 - 键盘 - 键盘方案 - 无