是否有“Do Refactor”的键盘快捷键。 IntelliJ IDE中的(重构预览窗格)? [英] Is there a keyboard shortcut for "Do Refactor" (Refactor Preview Pane) in IntelliJ IDE?

查看:2112
本文介绍了是否有“Do Refactor”的键盘快捷键。 IntelliJ IDE中的(重构预览窗格)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您尝试在(PHP,Java ..)代码中尝试折射某些方法时,如何按Do refractor按钮。

How to press "Do refractor" button when you are trying to refractor some method in (PHP, Java..) code.

步骤:


  • 按ctrl + r重命名方法

  • 更改名称然后按Enter键

  • 然后另一个面板显示此方法的用法和Do Refactor按钮

有没有办法在不使用鼠标的情况下按Do Refactor?

Is there a way to press "Do Refactor" without using the mouse?

推荐答案

IntelliJ尝试仅使用键盘解决尽可能多的问题。

IntelliJ tries to solve as many problems as possible using only your keyboard.

在您的情况下,显示重构预览的面板非常有用。您可以使用箭头键在此面板中导航,并按 Del 排除不需要的重构。要确认重构,只需按 Alt + D Do Refactor 按钮在 D 上有一个快捷键,这就是你甚至不需要记住它的原因。

In your case, a panel showing a refactoring preview is really useful. You can use your arrow keys to navigate through this panel and exclude unwanted refactorings by pressing Del. To confirm the refactoring, just press Alt + D. The Do Refactor button has a shortcut underline on the D, that's why you don't even need to memorize this.

关于你的第二个问题(骆驼案例导航):你需要检查以下设置:

Regarding your second question (camel case navigating): you need to check the following setting:

设置>编辑>一般>智能钥匙>使用CamelHumps字样

现在,您可以使用 Ctrl + R / LArrow <在字符串中导航/ kbd>。

Now you can navigate within Strings using Ctrl + R/LArrow.

顺便说一下:您可以随时按 Esc 返回编辑。

Btw: you can return to your editor anytime by pressing Esc.

最后 - 你可以按 Ctrl + Shift + A 执行几乎所有命令。只需键入命令的名称(如重命名)即可执行它。因此,即使没有快捷方式,也不需要使用鼠标。

And finally - you can execute almost any command by pressing Ctrl + Shift + A. Simply type the name of your command (like Rename) to execute it. So even without a shortcut, you don't need to use your mouse.

这篇关于是否有“Do Refactor”的键盘快捷键。 IntelliJ IDE中的(重构预览窗格)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆