2020-10-29 11:13:38
浏览数 (1)
去除重复代码的波浪线提示
- settings -> Inspections
- × duplicated code
自动导包
- settings -> Auto Import
- √ Optimize imports on the fly:自动去掉一些没有用到的包
- √ Add unambiguous imports on the fly:自动帮我们优化导入的包
去掉xml黄色背景
- settings -> Editor -> Inspections
- × No data sources configured(没有配置数据源)
- × SQL dialect detection(SQL方言检测)
实用插件
- Alibaba Java Coding Guidelines (代码规范)
- Gitee (码云)
- Lombok Plugin (Lombok)
- Free Mybatis plugin (mapper定位)
- MyBatis Log Plugin(sql日志)
- String Manipulation(字符串转换 Alt m)
- Restfultookit(url接口查询)
- Key promoter(快捷键记忆辅助)
- JRebel(热部署)
ascii 显示中文
- settings -> Editor -> File Encodings
- √ Transparent native-to-ascii conversion
配置maven
- settings -> Build, Execution,Deployment -> Build Tools -> Maven
- Maven home directiory : F:/apache-maven-3.5.0
- User settings file : F:apache-maven-3.5.0confsettings.xml
- Local repository : F:apache-maven-3.5.0repo
配置maven自动导包
- settings -> Build, Execution,Deployment -> Build Tools -> Maven -> Importing
- √ Improt Maven projects automatically
使用Lombok
- settings -> Preferences -> Compiler -> Annotation Processors
- √ Enable annotation processing
自动编译
- settings -> Build, Execution,Deployment -> Compiler
- √ Build project automatically
忽略大小写开关(选用)
- settings -> Editor -> General -> Code Completion
- Case sensitive comletion: 选择 None
悬浮提示开关(选用)
- settings -> Editor -> General
- √ Show quick documentation on mouse move Delay(ms): 500
取消单行显示tabs的操作
- settings -> Editor -> General -> Editor Tabs
- × Show tabs in single row
行号显示
- settings -> Editor -> General -> Appearance
- √ Show line numbers
去除控制台信息显示行数限制
代码语言:javascript
复制idea.cycle.buffer.size=disabled
防止idea内存溢出
- idea目录binidea64.exe.vmoptions
代码语言:javascript
复制-Xms1024m
-Xmx2048m
装逼插件
- Nyan progress bar (猫咪进度条) http://plugins.jetbrains.com/plugin/8575-nyan-progress-bar
- Power mode II (输入爆炸)http://plugins.jetbrains.com/plugin/8251-power-mode-ii
类、接口、枚举 注释
- settings -> Editor -> File and Code Templates
- Files 小标签 选 Class
代码语言:javascript
复制#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
* @package ${PACKAGE_NAME}
* @project-name 项目名称
* @description //TODO 请对该类编写一个描述
* @author Created by 翟凤玺
* @create-datetime ${DATE} ${HOUR}:${MINUTE}
*/
public class ${NAME} {
}
方法注释
- settings -> Editor -> Live Templates
- 右侧 绿色加号 -> Template Group -> zhaiGroup
- 选中zhaiGroup -> 点击绿色加号 -> Live Template
- Abbreviation:zhai
- Template Text:
代码语言:javascript
复制/**
* @method-name //TODO 请复制该方法的方法名到此处
* @description //TODO 请描述该方法
* @author 翟凤玺
* @date $date$ $time$
* @param //TODO 请输入入参对象
* @return //TODO 请输入返回对象
* @version V1.0
* update-logs: 方法变更说明
* ****************************************************
* name:
* date:
* description:
* *****************************************************
*/
- 点击define 选择everywhere
- 点击 Edit variables -> 进入列表:分别给date 和 time 在Expression列上选中 date() time()
- 点击OK 完成
- 在需要注释的方法上 输入 zhai tab键 即可。