简介
作为一名开发人员,idea是必须使用的工具,从windows切换过来发现很多快捷键有一些变化,如何才可以找到经常使用的快捷键呢?因此需要找到一个根本的方法而不是靠百度快捷键。以下会通过idea工具条上给大家介绍我认为常用的快捷键,下面以mac为例,告诉大家如何查找快捷键。
跳转
-
navigate -> last edit location:
command + shift + delete
根据意思可以明白是上次编辑的位置,大家可以在菜单中查找,如下图所示:WechatIMG52.jpeg
。
-
navigate -> forward:
command + [
-
navigate -> declaration or usages:
command + B
-
navigate -> implementation:
option + command + B
-
navigate -> type declaration:
shift + command + B
-
navigate -> super class:
command + U
书签与收藏
- toggle bookmark:
F3
- toggle bookmark mnemonic:
option + ⌘
- show bookmarks:
command + F3
- add favorites:
option + shift + F
重构
- refactor -> rename:
shift + F6
(可以重构变量名) - refactor -> change signature:
command + F6
- refactor -> extract -> variable:
option + command + V
- refactor -> extract -> parameter:
option + command + P
- refactor -> extract -> method:
option + command + M
快速编码
- variable.nn -->
if(variable != null){ }
git集成
- navigate -> previous change:
ctrl + option + shift + 上箭头
- vcs -> git -> revert:
option + command + Z
(可以在代码修改处、文件、文件夹撤回)
调试
- run -> toggle line breakpoint:
command + F8
阅读
- navigate -> file structure:
command + F12
- diagrams -> show diagram:
option + shift + command + U
- call hierarchy(查看方法的调用层次):
ctrl + option + H
其他
- edit->select all occurrences:
ctrl + command + G
- edit->reformat code:
option + command + L
- translate:
ctrl + command + U
- new file:
ctrl + option + N
- copy file:
F5
- move file:
ctrl + command + U
- 调出剪切板:
shift + command + V
- antion:
local history
用来查看本地的历史记录 - 选你所想:
option + 上箭头/下箭头
- 驼峰:
option + shift + U
- 生成getset:
command + N
此外另附官网关于windows和mac的快捷键大全


网友评论