idea使用技巧总结,超实用(2年mac idea使用经验)

本人于19年7月开始,几乎每天都在使用idea,2年期间总结了如下使用技巧,现分享给大家。

篇幅较长,建议先收藏。需要的时候根据目录查看

目录

1、annotate显示代码编写者及时间

2、全局搜索快捷键、类搜索

3、替换快捷键

4、Ctrl+ 加减键控制当前页面大小

5、IDEA快捷撤销 commit

6、IDEA忽略不必要提交的文件

7、IDEA 中的module

8、快速查看项目结构配置

9、设置鼠标悬停浮现注释

10、IDEA 自动删除类中无用包、自动导入包

11、显示方法分隔符、行号

12、提示忽略大小写

13、tabs多行展示

14、设置UTF-8编码模式

15、修改类头的文档注释信息,例如作者等信息

16、开启自动编译

17、IDEA常用快捷代码模版

18、配置git

19、IDEA断点调试、条件断点、查看变量或表达式的值

科普文章

左下角侧边按钮:

条件断点设置:

断点类型:行断点最常用

debug调试视频:

20、IDEA生成JavaDoc

21、IDEA去掉屏幕中间的白色竖线

22、方法缩进线颜色

23、方法分割线颜色

24、idea选中代码生成方法,重构之提炼函数

25、IntelliJ IDEA 中自动生成 serialVersionUID

26、查看本地历史记录

27、diff的时候可忽略空格、格式、空行

28、多行todo

29、设置文件夹类型,Mark Direction As 选项解读

30、窗口组件设置(项目目录处的设置按钮)

31、阿里Java程序员必备的Intellij IDEA 插件

32、Project structure说明

33、idea 右下角structure窗口说明

34、IDEA查看类继承关系

35、IDEA git merge

36、tab键、换行改为4个空格

37、设置每行最大长度 Hard wrap at

38、idea merge合并操作

39、IntelliJ IDEA IDE设置系列教程 网址

40、添加try catch语句快捷键 option+command+t

41、解决Mac IDEA写代码卡顿


 

1、annotate显示代码编写者及时间

 

2、全局搜索快捷键、类搜索

Ctrl+Shift+F打开搜索窗口

Command + O 查找类文件

Command + Shift + O 查找所有类型文件、打开文件、打开目录,打开目录需要在输入的内容前面或后面加一个反斜杠/

 

3、替换快捷键

当前页面替换,Ctrl+R

整个项目替换,Ctrl+Shift+R

 

4、Ctrl+ 加减键控制当前页面大小

在File -> Setting -> Editor -> General下进行设置

 

5、IDEA快捷撤销 commit

选择mixed方式

 

6、IDEA忽略不必要提交的文件

https://blog.csdn.net/shadow_zed/article/details/80901322

 

7、IDEA 中的module

 

8、快速查看项目结构配置

 

9、设置鼠标悬停浮现注释

 

10、IDEA 自动删除类中无用包、自动导入包

 

11、显示方法分隔符、行号

方法分隔符效果图:

 

12、提示忽略大小写

效果图

 

13、tabs多行展示

效果图

 

14、设置UTF-8编码模式

Transparent native-to-ascii conversion 主要用于转换 ascii,一般都要勾选, 不然 Properties 文件中的注释显示的都不会是中文。

 

15、修改类头的文档注释信息,例如作者等信息

比如:

/**

@author shkstart

@create ${YEAR}-${MONTH}-${DAY} ${TIME}

*/

常用的预设的变量,这里直接贴出官网给的:

  • ${PACKAGE_NAME} - the name of the target package where the new class or interface will be created. ${PROJECT_NAME} - the name of the current project.
  • ${FILE_NAME} - the name of the PHP file that will be created.
  • ${NAME} - the name of the new file which you specify in the New File dialog box during the file creation. ${USER} - the login name of the current user.
  • ${DATE} - the current system date.
  • ${TIME} - the current system time.
  • ${YEAR} - the current year.
  • ${MONTH} - the current month.
  • ${DAY} - the current day of the month.
  • ${HOUR} - the current hour.
  • ${MINUTE} - the current minute.
  • ${PRODUCT_NAME} - the name of the IDE in which the file will be created. ${MONTH_NAME_SHORT} - the first 3 letters of the month name. Example: Jan, Feb, etc. ${MONTH_NAME_FULL} - full name of a month. Example: January, February, etc.

 

16、开启自动编译

 

17、IDEA常用快捷代码模版

psvm -> public static void main(String[] args)

prsf -> private static final

psf ->public static final

psfi -> public static final int

psfs -> public static final String

类推。。

sout -> System.out.println();

fori -> for (int i = 0; i < ; i++)

iter -> for (String s: arr) 增强版for循环

 

18、配置git

 

  • 18
    点赞
  • 80
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值