idea快捷方式整理
使用idea的最关键的原因就是要增加我的开发效率,那怎么能少了idea的快捷键呢?所以就特意去查了查idea的快捷方式。
这是官网给出的快捷方式:
-
Double
Ctrl Run Anything
Execute commands, such as opening a project, launching a run/debug configuration, running a command-line utility, and so on. The available commands depend on the set of plugins and tools you have configured for your project.
-
Double
Shift Search Everywhere
Find anything related to IntelliJ IDEA or your project and open it, execute it, or jump to it.
-
Ctrl+Shift+A Find Action
Find a command and execute it, open a tool window or search for a setting.
-
Ctrl+NCtrl+Shift+NCtrl+Shift+Alt+N Find a class, file, or symbol
Find and jump to the desired class, file, or symbol.
-
Ctrl+E View recent files
Select a recently opened file from the list.
-
Alt+Enter Show intention actions
Improve or optimize a code construct.
-
Ctrl+Space Basic code completion
Complete names of classes, methods, fields, and keywords within the visibility scope.
-
Ctrl+WCtrl+Shift+W Extend or shrink selection
Increase or decrease the scope of selection according to specific code constructs.
-
Ctrl+/Ctrl+Shift+/ Add/remove line or block comment
Comment out a line or block of code.
-
Ctrl+Shift+F7 Highlight usages in a file
Highlight all occurrences of the selected fragment in the current file.
翻译一下:
-
Double
Ctrl 运行任何东西
执行命令,例如打开项目,启动运行/调试配置,运行命令行实用程序等。 可用命令取决于您为项目配置的插件和工具集。
-
Double
Shift 随处搜索
找到与IntelliJ IDEA或您的项目相关的任何内容,然后打开它,执行它或跳转到它。
-
Ctrl+Shift+A 寻找行动
查找命令并执行它,打开工具窗口或搜索设置。
-
Ctrl+NCtrl+Shift+NCtrl+Shift+Alt+N 查找类,文件或符号
查找并跳转到所需的类,文件或符号。
-
Ctrl+E 查看最近的文件
从列表中选择最近打开的文件。
-
Alt+Enter 显示意图行动
改进或优化代码构造。
-
Ctrl+WCtrl+Shift+W 扩展或缩小选择范围
根据特定代码构造增加或减少选择范围。
-
Ctrl+/Ctrl+Shift+/ 添加/删除行或阻止评论
注释掉一行或一段代码。
-
Ctrl+Shift+F7 突出显示文件中的用法
突出显示当前文件中所有出现的所选片段。
其他的一些常用小技巧:
-
Ctrl+B 快速转到声明,如果将光标放在类,方法或变量中并使用快捷方式,则会立即跳转到元素的声明。
-
Ctrl+Alt+insert 快速打开创建选项
-
Ctrl+W 快速选择代码,第一次按下组合键会选择这一行的代码,第二次按下会选择这一个代码块,第三次会选择整个方法,第四次会扩展到整个类,以此类推直至选中整个文档。
-
Ctrl+Shift+Enter 快速为声明添加大括号,并自动将光标对齐
-
Ctrl+N 搜索类的名字将光标转到类声明的位置