Idea commonly used optimization

Remove the wavy line prompt of repeated code

  • settings -> Inspections
  • × duplicated code

Automatic guide package

  • settings -> Auto Import
  • √ Optimize imports on the fly: automatically remove some unused packages
  • √ Add unambiguous imports on the fly: automatically help us optimize imported packages

Remove xml yellow background

  • settings -> Editor -> Inspections
  • × No data sources configured (no data sources configured)
  • × SQL dialect detection (SQL dialect detection)

Useful plug-ins

  • Alibaba Java Coding Guidelines (Code Specification)
  • Gitee (Code Cloud)
  • Lombok Plugin (Lombok)
  • Free Mybatis plugin (mapper positioning)
  • MyBatis Log Plugin (sql log)
  • String Manipulation (string conversion Alt+m)
  • Restfultookit (URL interface query)
  • Key promoter (shortcut key memory aid)
  • JRebel (hot deployment)
  • Rainbow Brackets (Rainbow Brackets)
  • Nyan progress bar (cat progress bar)
  • Power mode II (input explosion)

ascii show Chinese

  • settings -> Editor -> File Encodings
  • √ Transparent native-to-ascii conversion

Configure 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.0\conf\settings.xml
  • Local repository : F:\apache-maven-3.5.0\repo

Configure Maven to automatically guide the package

  • settings -> Build, Execution,Deployment -> Build Tools -> Maven -> Importing
  • √ Improt Maven projects automatically

Use Lombok

  • settings -> Preferences -> Compiler -> Annotation Processors
  • √ Enable annotation processing

Automatic compilation

  • settings -> Build, Execution,Deployment -> Compiler
  • √ Build project automatically

Ignore case switch (optional)

  • settings -> Editor -> General -> Code Completion
  • Case sensitive comletion: 选择 None

Suspended prompt switch (optional)

  • settings -> Editor -> General
  • √ Show quick documentation on mouse move Delay(ms): 500

Cancel the operation of single line display tabs

  • settings -> Editor -> General -> Editor Tabs
  • × Show tabs in single row

Line number display

  • settings -> Editor -> General -> Appearance
  • √ Show line numbers

Remove the limit on the number of lines displayed on the console information

  • idea directory\bin\idea.properties
idea.cycle.buffer.size=disabled

Prevent idea memory overflow

  • idea directory\bin\idea64.exe.vmoptions
-Xms1024m
-Xmx2048m
  • Xms minimum memory
  • Xmx maximum memory

Class, interface, enumeration annotation

  • settings -> Editor -> File and Code Templates
  • Select Class for the Files tab
#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} {
}
  • Similarly, choose Interface Enum

Method notes

  • settings -> Editor -> Live Templates
  • Green plus sign on the right -> Template Group -> zhaiGroup
  • Select zhaiGroup -> click the green plus sign -> Live Template
  • Abbreviation: zhai
  • Template Text:
/**
 * @method-name //TODO 请复制该方法的方法名到此处
 * @description //TODO 请描述该方法
 * @author 翟凤玺
 * @date $date$ $time$
 * @param //TODO 请输入入参对象
 * @return //TODO 请输入返回对象
 * @version V1.0
 * update-logs: 方法变更说明
 * ****************************************************
 * name:
 * date:
 * description:
 * *****************************************************
 */
  • Click define to select everywhere
  • Click Edit variables -> to enter the list: select date() time() in the Expression column for date and time respectively
  • Click OK to finish
  • Enter zhai + tab on the method that needs to be annotated.

Guess you like

Origin blog.csdn.net/u010318957/article/details/109098348