好长时间没做博客的更新了,最近在工作使用idea时,
遇到了一些问题,所以根据自己的情况,
专门在b站上找了尚硅谷大佬的视频教程,将idea中常用的一些设置记录下来,利于以后的学习,
同时希望对大家也有一定的帮助,撒花撒花。
快捷改变字体大小
file–>setting–>editor–>general 选中箭头所指即可以实现通过“ctrl+鼠标滚轮”快捷改变字体大小

文档显示的时间延时
file–>setting–>editor–>general 设置当鼠标移动到某个类或方法上时,显示该类或方法的具体文档介绍

自动导包
file–>setting–>editor–>general -->auto import 设置自动导包功能,需要把箭头所指处的“ask”改为“all”,并将红框内的内容勾上

显示行号和方法的分隔符
file–>setting–>editor–>general -->appearance

设置取消单行显示tabs的操作
file–>setting–>editor–>general -->editor tabs

忽略大小写的提示
file–>setting–>editor–>general -->code completion

添加文档头部注释信息
file–>setting–>editor–>general -->file and code templates

设置项目文件编码
file–>setting–>editor–>file file encodings

设置自动编译
file–>setting–>build,execution,deloyment–>compiler

取消自动更新
file–>setting–>appearance&behavior–>system settings 
断点调试
总览:
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-gnXyWO7Q-1628902644622)(./img/Snipaste_2021-08-13_12-23-34.png)]](https://img-blog.csdnimg.cn/046541d1865447dfbcd2d07eaa74b914.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzg3MDY3MA==,size_16,color_FFFFFF,t_70)
step over

step into
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-qEG4D7n9-1628902644624)(./img/Snipaste_2021-08-13_12-28-45.png)]](https://img-blog.csdnimg.cn/e2f74adce03f435486a6469afd4decb5.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzg3MDY3MA==,size_16,color_FFFFFF,t_70)
force step into

step out
如果进入了一个方法体,作用就是跳出当前方法体

resume program

stop

mute breakpoints

view breakpoints

常用快捷键
关于快捷键这块,因为之前我是从eclipse过渡到idea的,
所以在设置快捷键时,选择了,和eclipse差不多的选项,
其中也做了自己的一部分更改,
大家也可以根据自己的需要,定义自己的快捷键。
-
查看类的结构 * ctrl+O:查看类的结构 -
向上、下移动行 * 向下:alt+向下箭头 * 向上:alt+向上箭头 -
查看继承关系 * f4:查看类的继承关系 -
删除一行 * ctrl+d:删除一行 -
代码左移,代码右移 * tab:代码右移 * shift +tab:代码左移 -
快速移动到上一行、下一行 * CTRL+alt+enter:向上开始新的一行
* shift+enter :向下开始新的一行
-
向下复制 * ctrl+alt+向下箭头 -
整体重新修改变量名 * alt+shift+r:重构,修改变量名和方法名 -
大小写切换 * ctrl+shift+r:大小写转换 -
查看方法的参数 * CTRL+alt+/:查看方法的参数有哪些 -
回到前一个或后一个编辑界面 * alt+向左箭头:回到前一个编辑界面 * alt+向右箭头:回到后一个编辑界面 -
生成构造器、get和set方法 * alt+insert:构建生成器、get、set等方法 -
打开、关闭所有方法 * shift+o:打开所有方法 * shift+c:关闭所有方法 -
生成 try……catch等 * alt+shift+z:快捷生成if、try-catch等 -
局部变量转成员变量 * ctrl+alt+f:局部变量转成员变量 -
全局查找 * ctrl+shift+n:全局查找 -
生成uml文件 * ctrl+shift+alt+u:将当前类的结构生成uml图 -
抽取方法 * alt+shift+m:快速抽取方法 -
打开最近修改的文件 * ctrl+e:打开最近修改的文件 -
快速定位代码错误 * ctrl+shift+q:快速定位代码错误 -
查看最近复制的内容 * ctrl+shift+v:选择要粘贴的内容 -
查看方法在哪被调用 * ctrl+alt+h:查看方法在哪被调用
idea集成git、gitee
-
下载并安装git 下载链接:https://git-scm.com/ 安装:无脑安装,但要记一下安装安装位置(后面配置要用) -
idea中配置git,选择git.ee ![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-6Gce0WcV-1628902644627)(./img/QQ图片20210813223731.png)]](https://img-blog.csdnimg.cn/c42533a9213a45dcbb0c13b56ca50964.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzg3MDY3MA==,size_16,color_FFFFFF,t_70) -
idea安装gitee插件,并重启 -
根据gitee的邮箱和账号,连接到gitee,注意,一定是邮箱,不能是电话

-
分享自己的代码到gitee ![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-O1h6L53I-1628902644628)(./img/QQ图片20210813224048.png)]](https://img-blog.csdnimg.cn/ac879871a7e749bfb4f72cca1854c08d.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzg3MDY3MA==,size_16,color_FFFFFF,t_70) -
从gitee上获取代码 ![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-BJlZV2Bq-1628902644629)(./img/QQ图片20210813224128.png)]](https://img-blog.csdnimg.cn/482f5dbe38284b939686441ab21ddca2.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzg3MDY3MA==,size_16,color_FFFFFF,t_70)
|