IDEA配置及快捷键

快捷键:

格式化代码 Ctrl+alt+L

后退Ctrl+alt+ <-

格式化代码快捷键:Ctrl + Alt + L

删除整行:Ctrl+X

实现类 ctrl + alt

Ctrl+N 查找类

Ctrl+Shift+N 查找文件

CTRL+SHIFT+ALT+N 查找类中的方法或变量

Ctrl+Alt+O 优化导入的类和包

Ctrl+R 替换文本

shift + shift全局搜索

alt+enter 提示错误解决方案

ctrl+F12 查找当前类中的变量和方法

Alt+Insert get/set方法快捷键

ctrl + space 提示

Ctrl + Shift +N 定位类及行数 如, 类名:行数

Alt + F7   find usages找方法被调用处 

IDEA 安装配置:

不需要主动保存,自动build

1.  License server : http://idea.iblue.me

别忘了在hosts文件加一行
0.0.0.0 account.jetbrains.com
禁止它联网校验

K6IXATEF43-eyJsaWNlbnNlSWQiOiJLNklYQVRFRjQzIiwibGljZW5zZWVOYW1lIjoi5o6I5p2D5Luj55CG5ZWGOiBodHRwOi8vaWRlYS5oay5jbiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjAxOS0wNi0wNSIsInBhaWRVcFRvIjoiMjAyMC0wNi0wNCJ9LHsiY29kZSI6IkFDIiwiZmFsbGJhY2tEYXRlIjoiMjAxOS0wNi0wNSIsInBhaWRVcFRvIjoiMjAyMC0wNi0wNCJ9LHsiY29kZSI6IkRQTiIsImZhbGxiYWNrRGF0ZSI6IjIwMTktMDYtMDUiLCJwYWlkVXBUbyI6IjIwMjAtMDYtMDQifSx7ImNvZGUiOiJQUyIsImZhbGxiYWNrRGF0ZSI6IjIwMTktMDYtMDUiLCJwYWlkVXBUbyI6IjIwMjAtMDYtMDQifSx7ImNvZGUiOiJHTyIsImZhbGxiYWNrRGF0ZSI6IjIwMTktMDYtMDUi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AwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQAF8uc+YJOHHwOFcPzmbjcxNDuGoOUIP+2h1R75Lecswb7ru2LWWSUMtXVKQzChLNPn/72W0k+oI056tgiwuG7M49LXp4zQVlQnFmWU1wwGvVhq5R63Rpjx1zjGUhcXgayu7+9zMUW596Lbomsg8qVve6euqsrFicYkIIuUu4zYPndJwfe0YkS5nY72SHnNdbPhEnN8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow==
 

2. 配置maven settings

Setting->maven->runner

         VMoptions: -DarchetypeCatalog=internel  (通过让Maven从本地仓库加载项目模板和依赖,显著提高了Maven项目的创建和配置速度)

3. 工具栏 view 》 Toolsbar + Tool Buttons

4. 主题 字体 》 代码字体 :Editer > font

5. 编码格式 Editer > File Encodings > UTF-8  记得勾选Transparent native-to-ascii conversion

6. 搜索,ctrl+shift+F 不管用,一般是被输入法占用了,修改输入法的快捷键

7.全局设置 File > Other Setting

8.编译设置 Settings > Build,Execution,D > Compiler >Java Compiler > Project bytecode version 选择Jdk版本

9.自动导包 Settings > Editor > General > Auto Import > Optimize imports + Add unambiguous imports;

  Settings > Build,Execution,D > Build Tools> Maven > importing -> Automatically download: Sources + Documentation 让mavne自动加载源码和文档

  重新下载jar包源码,在Terminal执行命令:

    mvn dependency:resolve -Dclassifier=sources

10. 自动提示时取消大小写区分 Settings > Editor > General > Code Completion > first Letter - None

10. Alt + F8 调试中搜索变量中的内容

11. 防止maven 控制台中文乱码问题  :Setting->maven->runner

         VMoptions: -Dfile.encoding=GB2312,-DarchetypeCatalog=internel

 防止tomcat乱码:TomcatServer > VM options 设置为 -Dfile.encoding=UTF-8 ,重启tomcat

 JVM防止乱码: HELP-> Edit Custom VM OPtions 中加 -Dfile.encoding=utf-8 重启idea

12. 将Terminal窗口命令改为Linux命令  Setting -> Tools -> Terminal -> Shell path 改为本地git的命令,如:F:\Git\bin\bash.exe

13.热更新插件 JRebel

JRebel安装、最新激活方式_jrebel激活_℡才知道的博客-CSDN博客

14、配置方法注释模板

a、文件注释

 /**
 * @param
 * @auther: WANGZHENFANG004
 * @version v1
 * @summary:
 * @since: ${YEAR} ${MONTH} ${DAY} ${HOUR} ${MINUTE}
 */

b、快捷注释

注意:下方的是** 不是/** ,解决idea版本的bug问题,这样/***+回车就可以正常注释了。 

**
 * @auther: WANGZHENFANG004
 $param$
 * @version v1
 * @summary: $end$
 * @since: $date$ $time$
 */

groovyScript("if(\"${_1}\".length() == 2) {return '';} else {def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();for(i = 0; i < params.size(); i++) {if(i==0){result+='* @param ' + params[i] + ' '}else{result+='\\n' + ' * @param ' + params[i] + ' '}}; return result;}", methodParameters());

15. 电脑16G内存,配置idea.vmoptions

-Xms1024m
-Xmx4096m
-XX:MaxMetaspaceSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+PrintGC   
-XX:+PrintGCDetails
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:ReservedCodeCacheSize=512m

16、mas系统安装两个idea

先直接双击安装包进行安装,选择‘保留两者’。

然后更新idea的config和system配置了,右键idea2显示包内容,然后Contents -> bin -> idea.properties,增加如下配置:

idea.config.path=/Users/xxx/cache/idea/idea202301/config
idea.system.path=/Users/xxx/cache/idea/idea202301/system


参考文档 Mac安装多个版本软件同时使用_mac如何安装2个idea-CSDN博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值