IDEA 快捷键

ctrl +y: 删除一行
CTRL+d :复制一行
Alt+/: 补全
shift +<> :移动单词
ctrl +w :选择区域 ----CTRL+shift+w 缩小选择区域
Ctrl+空格:补全xml的tag标签 CTRL+空格就是代码补全
双击shift:搜索所有位置
ctrl+shift+N:搜索并进入文件
alt+home:导航窗口
Ctrl+Q:在插入符号中快速查看类或方法的文档
Ctrl+Shift+J快捷键将两行合并为一个,移除不必要的空间以匹配你的代码风格
Ctrl+O(代码|覆盖方法),您可以轻松地覆盖基类的方法。o:override
用Ctrl+I(代码|实现方法),要实现当前类实现的接口(或抽象基类的接口)的方法 i:implement

ctrl + J live templet :快捷输入设置,自动补全
alte + F1 快速选择和编辑元素
Ctrl+Alt+T (Code | Surround With) 选择生成代码段 and choose try / catch. The catch blocks for all the exceptions thrown inside the block will be generated automatically.
File | Settings | File and Code Templates 自定义模板You can customize the bodies of the generated catch blocks on the Code tab of File | Settings | File and Code Templates.Use other items in the list to surround with other constructs.

代码补全在创建对象时;eg:StringBuff sb =new 。。。and press Ctrl+Shift+空格
将鼠标放在return上,CTRL+shift+F7查看所有的返回结果

ctrl + F12:查看类的所有方法和接口
ctrl + 空格:在新建变量输入完类型后可以获得提示变量名
Ctrl+Shift+J shortcut joins two lines into one and removes unnecessary space to match your code style. 快捷键将两行合并为一行,并删除不必要的空间以匹配您的代码风格。

IDEA增加书签
如果有多个书签,在打开这个书签管理的时候,可以完全使用键盘进行控制:按上下键进行选择,Enter键跳转到所选的书签那,Esc关闭窗口,Alt+上/下可以在这个列表将某个书签以Y轴移动。
我们还可以使用以(助记符)数字作为书签,在所在行按快捷键Ctrl+Shift+任意数字,就可以插入一个标签了,要将光标跳转到某个书签,只需要Ctrl+对应的标签数字。实在是很方便。

要在调试程序时轻松地评估任何表达式的值,请在编辑器中选择其文本(可以多次按Ctrl+W来有效地执行此操作),并按Alt+F8。
要在调试程序时快速评估任何表达式的值,按住Alt键并单击该表达式查看其值并计算它,调用方法等。

alt+insert:快速插入getter/seter等方法
在生成变量时可以使用快捷方式:变量生成.var回车
比如:userService.login("liufe32@outlook.com", "Swagger-Ranger").var


debug模式下,选中变量alt+F8就可以获得单步调试变量的值

To view all exit points of a method, place the caret at one of them, e.g. the return statement, and press Ctrl+Shift+F7:

idea中的surround with是把选中的代码块装进一些带有{}的语句中,比如if,try,for等等
快捷键是ctrl+alt+t,先选中代码,再按快捷键、

It is very easy to toggle between find and replace functionality.
When you perform search and replace in a file, pressing Ctrl+F shows the search pane. Pressing Ctrl+R adds field, where you can type the replace string.
While in the Find in Path dialog, you can switch to replace by pressing Ctrl+Shift+R. Same way, press Ctrl+Shift+F to hide the Replace with field, and switch to mere search.
在查找和替换功能之间切换非常容易。
在文件中执行搜索和替换时,按Ctrl+F显示搜索窗格。按Ctrl+R添加字段,您可以在其中键入replace字符串。
在“查找路径”对话框中,可以按Ctrl+Shift+R切换到“替换”。同样,按Ctrl+Shift+F隐藏Replace字段,切换到单纯搜索。

强制类型转换时使用:(+Ctrl+Shift+空格 ,自动推荐转型类型
When you need to cast an expression value to the required type the SmartType code completion will help you. For example, type
String s = (
and press Ctrl+Shift+空格 to see what happens.
Ctrl+J:提示缩写,Use Ctrl+J to complete any valid Live Template abbreviation if you don't remember it. For example, type it and press Ctrl+J to see what happens.

本博客为Swagger-Ranger的笔记分享,文中源码地址: https://github.com/Swagger-Ranger
欢迎交流指正,如有侵权请联系作者确认删除: liufei32@outlook.com

posted on 2019-04-08 15:34  Swagger-Ranger  阅读(854)  评论(0编辑  收藏  举报

导航