IDAE常用设置

214 阅读1分钟

IDAE常用设置

【1】进入设置

方式1:

点击IDEA左上角File然后点击Serrings

image-20231003143717376

方式2:点击idea又上交工具图标,然后点击Settingsimage-20231003144002465

方式3:如图所示快捷键 Ctrl+Alt+S

设置示意图为:

image-20231003144137770

【2】设置IDEA主题

在设置中的Appearance&Beachavior下的Appearance里

image-20231003144249038

【3】编辑区的字体变大或者变小

img

【4】鼠标悬浮在代码上有提示

image-20231003161446458

【5】自动导包和优化多余的包

手动导包:快捷键 Alt+Enter

image-20231003161803523

自动导包和优化多余的包:

image-20231003161957791

【6】同一个包下的类,超过制定个数的时候,导包合并为*

image-20231003162421618

【7】显示行号,方法和方法之间的分隔符

image-20231003162624194

【8】忽略大小写,进行提示

image-20231003162856430

【9】多个类不隐藏,多行显示

image-20231003163138052

image-20231003163157784

【10】设置默认的字体,字体大小,字体行间距

image-20231003163431416

【11】修改代码中的注释的字体颜色

image-20231003163756608

【12】修改类头的文档注释信息

image-20231003164538518

预定义内容:

/**
@className: ${PACKAGE_NAME}.${NAME}
@description: TODO
@author: soul
@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.

【13】设置项目文件编码

image-20231003164955460

注意:IDEA右下角也可以调整代码字符编码格式(用来修改文件乱码)

image-20231003165114947

【14】自动编译

image-20231003165449182

【15】省电模式

IDEA如果开启了省电模式,会关掉代码检查和代码提示等功能

image-20231003165607397

【16】生成序列化版本号

image-20231003170432997

image-20231003170559319

image-20231003170611800