Visual Studio 2010:如何重新映射 F2 来重命名文件而不是打开对象浏览器

发布于 2024-09-11 20:32:53 字数 83 浏览 3 评论 0原文

在 Visual Studio 2010 解决方案资源管理器树视图中,如何重新映射 F2 键以重命名所选文件而不是打开对象浏览器?

In Visual Studio 2010 Solution Explorer tree view, how can I remap the F2 key to Rename the Selected File rather than open Object Browser?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

樱花细雨 2024-09-18 20:32:53

执行以下

  • 工具 ->选项
  • 展开环境并选择键盘
  • 在文本框中键入“文件.重命名”
  • 将焦点放在“按快捷键”框上,然后按 F2 单击
  • 分配

Do the following

  • Tools -> Options
  • Expand Environment and select Keyboard
  • Type "File.Rename" into the text box
  • Put the Focus on the "Press Shortcut keys" box and hit F2
  • Click Assign
街角卖回忆 2024-09-18 20:32:53

要使用 F2 键启用标识符或方法等的重命名(即变量或方法名称),请执行以下操作:

  • 工具 -> 工具 -> 方法名称。选项
  • 展开环境并选择键盘
  • 在显示“显示包含的命令”的文本框中键入“Refactor.Rename”
  • 将焦点放在“按快捷键”框上,然后按 F2 单击
  • 分配

To enable the renaming of an identifier or method, etc. using the F2 key (i.e a variable or a method name), do the following:

  • Tools -> Options
  • Expand Environment and select Keyboard
  • Type "Refactor.Rename" into the text box that says 'Show commands containing'
  • Put the Focus on the "Press Shortcut keys" box and hit F2
  • Click Assign
執念 2024-09-18 20:32:53

我不知道你怎么想,但在我的 VS2010 副本中,解决方案资源管理器中的 F2 确实会重命名该文件。当您点击F2时,您究竟选择了什么?

I don't know about you, but in my copy of VS2010, F2 in the Solution Explorer DOES rename the file. What exactly do you have selected when you hit F2?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文