简体   繁体   English

Visual Studio 2015 Ctrl + D(代码重复)不起作用(Resharper 的键盘快捷键方案问题)

[英]Visual Studio 2015 Ctrl + D (code duplication) not working (keyboard shortcut scheme issue with Resharper)

Ctrl + D in a Visual Studio 2015 Windows10 project is not working at all.. its working in Notepad++. Visual Studio 2015 Windows10 项目中的 Ctrl + D 根本不起作用..它在 Notepad++ 中工作。 I have tried to reboot my machine, and closed down Visual Studio but nothing works.我试图重新启动我的机器,并关闭了 Visual Studio,但没有任何效果。

I have Windows 10 Threshold 2 and Visual Studio 2015 Version 14.0.23107.0我有 Windows 10 Threshold 2 和 Visual Studio 2015 版本 14.0.23107.0

PS: it was working fine yesterday... PS:昨天还好好的……

Edit1:编辑1:

Keyboard mapping is looking good:键盘映射看起来不错: 在此处输入图片说明

RESHARPER is/was the culprit RESHARPER 是/曾经是罪魁祸首

How to fix:怎么修:

  • reset all Visual Studio settings ( Tools > Import and Export Settings > Reset all settings )重置所有 Visual Studio 设置(工具>导入和导出设置>重置所有设置
  • then go to the Resharper > Options > Keyboard & Menus and re-apply the keyboard shortcut scheme .然后转到Resharper > Options > Keyboard & Menus重新应用键盘快捷键方案

and now its working again!现在它又开始工作了!

重新安装 ReSharper 为我解决了这个问题

Just FYI, If you are VS 2019 User:仅供参考,如果您是 VS 2019 用户:

Extensions > Resharper > Options > Environment > Keyboard扩展> Resharper >选项>环境>键盘

Change Keyboard Scheme to None and save, then go back again and change it to Visual Studio将键盘方案更改为并保存,然后再次返回并将其更改为Visual Studio

I was struggling with this problem for a while and this method fixed it.我在这个问题上挣扎了一段时间,这个方法解决了它。

Below steps are worked for me.以下步骤对我有用。

  1. Go to Tools > Options >Environment >General> Keyboard转到工具>选项>环境>常规>键盘
  2. Select visual C# 2005 in keyboard mapping scheme在键盘映射方案中选择visual C# 2005
  3. In Show commands containing, search for Edit.Duplicate在显示命令包含中,搜索Edit.Duplicate
  4. Assign Ctrl + D in shortcut key在快捷键中分配Ctrl + D

转到文件->首选项->键盘快捷键-> 在顶部搜索重复-> 双击重复选择-> ctrl+Shift+D -> 按Enter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM