IntelliJ IDEA相关配置(一)

简介: IntelliJ IDEA相关配置(一)

本次使用:IDEA版本 2022.1.2

1.JDK相关设置

1.1 项目的JDK设置

File–>Project Structure…–>Platform Settings -->SDKs

注1:SDKs全称是Software Development Kit ,这里一定是选择JDK的安装根目录,不是JRE的目录。

注2:这里还可以从本地添加多个JDK。使用“+”即可实现。

1.2 out目录和编译版本

File–>Project Structure…–>Project Settings -->Project

2.详细设置

2.1 如何打开详细配置界面

显示工具栏

2、选择详细配置菜单或按钮:

2.2 系统设置

2.2.1 默认启动项目配置

启动IDEA时,默认自动打开上次开发的项目?还是自己选择?

如果勾上的话,每次打开IDEA会自动打开最近的一个项目。如果去掉Reopen projects on startup前面的对勾,每次启动IDEA就会出现如下界面:

2.2.2 取消自动更新

Settings–>Appearance & Behavior->System Settings -> Updates

默认都打√了,建议检查IDE更新的√去掉,检查插件更新的√选上。

2.3 设置整体主题

2.3.1 选择主题:

2.3.2 设置菜单和窗口字体和大小:

2.3.3 设置IDEA背景图:

选择一张合适的图片作为背景,即可。

2.4 设置编辑器主题样式

2.4.1 编辑器主题:

2.4.2 字体大小:

更详细的字体与颜色如下:

提示:如果选择某个font字体,中文乱码,可以在fallback font(备选字体)中选择一个支持中文的字体。

2.4.3 注释的字体颜色:

Block comment:修改多行注释的字体颜色

Doc Comment –> Text:修改文档注释的字体颜色

Line comment:修改单行注释的字体颜色

2.5 显示行号与方法分隔符:

2.6 代码智能提示功能:

IntelliJ IDEA 的代码提示和补充功能有一个特性:区分大小写。 如果想不区分大小写的话,就把这个对勾去掉。建议去掉勾选。

2.7 自动导包配置

默认需要自己手动导包,Alt+Enter快捷键

自动导包设置:

  • 动态导入明确的包:Add unambiguous imports on the fly,该设置具有全局性;
  • 优化动态导入的包:Optimize imports on the fly,该设置只对当前项目有效;

2.8 设置项目文件编码(一定要改)

说明: Transparent native-to-ascii conversion主要用于转换ascii,显式原生内容。一般都要勾选。

2.9 设置控制台的字符编码

2.10 修改类头的文档注释信息

/**
 * @description 
 * @author  yh
 * @date  ${DATE}
 */

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

${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.


IntelliJ IDEA相关配置(二):https://developer.aliyun.com/article/1416312

相关文章
|
20天前
|
Java 开发工具 Maven
IntelliJ IDEA安装教程(超详细)
IntelliJ IDEA安装教程(超详细)
80 1
|
26天前
|
XML IDE 开发工具
别看你风吹头顶凉但你绝对没有过这样方便的插件Intellij IDEA 自带的 Vim
别看你风吹头顶凉但你绝对没有过这样方便的插件Intellij IDEA 自带的 Vim
41 0
|
1月前
|
IDE Java 开发工具
如何安装intellij IDEA
如何安装intellij IDEA
|
2月前
|
IDE Java 数据库连接
IntelliJ IDEA安装使用教程——社区免费版——附中文插件安装
IntelliJ IDEA安装使用教程——社区免费版——附中文插件安装
245 0
|
2月前
|
Java 程序员 API
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
59 1
|
1月前
|
Java Maven
Maven【5】在IDEA环境中配置和使用Maven
Maven【5】在IDEA环境中配置和使用Maven
65 1
|
3天前
|
Java Maven
【IDEA】常用快捷键和自定义方法补全(附如何设置IDEA全局配置,如Maven)
【IDEA】常用快捷键和自定义方法补全(附如何设置IDEA全局配置,如Maven)
9 0
|
15天前
|
JSON Kubernetes Go
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
25 0
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
|
15天前
|
安全
IntelliJ IDEA 快捷键大全(三)
IntelliJ IDEA 快捷键大全
75 0
IntelliJ IDEA 快捷键大全(三)
|
27天前
|
Kubernetes Ubuntu Linux
通过 IntelliJ IDEA 对 containerd 进行源码级调试
本文介绍如何在 Ubuntu 22.04 系统上,通过 IntelliJ IDEA 对 containerd 进行源码级调试。我们将从 containerd 的安装、源码编译、验证调试信息的存在,到最终的调试过程中,每一步骤都进行详细讲解。
通过 IntelliJ IDEA 对 containerd 进行源码级调试