idea基本设置

一.设置默认字体大小

file->Settings  ->Editor->Font

修改字体大小 size:16

修改行距 line spacing :1.0

动态改变编辑区域字体大小:Settings->Editor->General 勾选change font size(Zoom) with Ctrl+Mouse Wheel(Ctrl+鼠标滚轮改变字体大小) 点击Apply 应用

 1.2 设置鼠标悬浮有注释提示:Settings->Editor->General 勾选 Show quick documentation on mouse move, Delay(ms)可以设置时间:鼠标悬浮多长时间出现文档提示(默认500)

1.3 提示忽略大小写 例如输入str 可以提示String

  Settings -> Editor->General->Code Completion  去掉勾选 Match Case ( First Letter ,All , None) (如果是Case sensitive completio 下拉选项,选择None)

1.4 多个类不隐藏,多行显示(默认只显示10个,多余10个时,前面打开的类会被关掉)

    Settings -> Editor -> Editor Tabs 取消勾选 Show tabs in single row, Tab limit 设置成想要同时显示的文件个数,例如 20

1.5 自动编译

      Settings -> Build,Execution,Deployment -> Compiler 勾选 Build project automatically 和 Compile independent modules in paralle

1.6 代码显示结构,打开某个类后,鼠标放在 该类名称上 右键,选择 Split Vertically 垂直展示 或者 Split Horizontally 水平展示

1.7 添加序列化版本号

Settings -> Inspections -> 查找框中输入 seri  勾选 Seralizable class without SerialVersionUUID, S使用的时候,某个类实现的了 Serializable 接口后,在该类中 Alt + Enter 点击 Add serialVersionUUID field

二.设置主题、字体样式和背景色

file->Settings(快捷键Ctrl+Alt+s)  ->Appearance & Behavior -> Apperance

Theme : 选择IntelliJ

可供选择的有Darcula、IntelliJ、Windows,Darcula是暗黑系。当然你也可以导入你自己喜欢的主题样式:

网上百度得到很多intellij idea的主题样式,你可以下载下来这里Import Scheme即可。

这样设置后主题和字体后就变得非常友好了

设置背景色

三.IntelliJ IDEA 设置编码为utf-8编码

IntelliJ IDEA 统一设置编码为utf-8编码

问题一:

File->Settings->Editor->File Encodings

问题二:

File->Other Settings->Default Settings ->Editor->File Encodings


问题三:
将项目中的.idea文件夹中的encodings.xml文件中的编码格式改为uft-8

问题四:

File->Settings->Build,Execution,Deployment -> Compiler -> Java Compiler

设置 Additional command line parameters选项为 -encoding utf-8

问题五:

1)打开Run/Debug Configuration,选择你的tomcat

2) 然后在  Server > VM options 设置为 -Dfile.encoding=UTF-8 ,重启tomcat

问题六:

清空浏览器缓存再试一次。

原文:https://blog.csdn.net/m0_38132361/article/details/80628203 

问题七 :解决IntelliJ IDEA控制台输出中文乱码问题

IntelliJ IDEA 控制台输出中文乱码部分如图所示:

二、解决方法:

1.打开tomcat配置页面,Edit Configurations。

2.选择项目部署的tomcat,在配置项VM options文本框中输入-Dfile.encoding=UTF-8,点击Apply或OK即可。

3.尝试重启tomcat,乱码问题解决。

ps:若乱码问题依然存在,请尝试继续按以下步骤解决:

1.打开IntelliJ IDEA本地安装目录中bin文件夹下的idea.exe.vmoptions和idea64.exe.vmoptions这两个文件。

2.分别在这两个文件内容的末尾添加-Dfile.encoding=UTF-8

3.打开IntelliJ IDEA>File>Setting>Editor>File Encodings,将Global Encoding、Project Encoding、Default encodeing for properties files这三项都设置成UTF-8,点击OK或者Apply。

4.重启IntelliJ IDEA即可解决乱码问题。

原文:https://blog.csdn.net/liu865033503/article/details/81094575 
 

 四、IDEA配置JDK

1、点击File -->Project Structure;

2、点击左侧标签页SDKs选项,再点击左上角“+”,选择JDK;

3、在弹出框选择JDK安装路径,点击OK即可配置成功。 

下图可以看到JDK已经在IDEA中配置好了。

五 .IDEA配置Maven

首先打开IDEA 选择File——Settings

我们还可以在勾选一些其他选项

六、IntelliJ IDEA设置自动导入包

IntelliJ IDEA可以自动优化导入包,但是有多个同名的类位于不同的包时,需要自己手动使用Alt + Enter进行导入。

  1. Settings→Editor→General→Auto Import
  2. 选中Optimize imports on the fly(优化多余的包)和Add unambiguous imports on the fly(自动导包)

Optimize imports on the fly:自动去掉一些没有用到的包

Add unambiguous imports on the fly:自动帮我们优化导入的包

注入spingbean(service,dao)时,idea右边总是有红色警告,去除该警告 的方法:

setting -> editor -> inspections-> 搜索spring bean 找到 Autowiring for Bean Class 取消后面的√

IDEA 如何显示一个类中所有的方法?

—— 在Project框中最右边有一个齿轮状的设置按钮,增加“show members”即可。

   

 

 idea文件定位图标消失

其实不是消失,而是你已经开启了自动定位

文件定位图标(手动定位)和Always Select Opened File(自动)是互补的,取消自动定位选项后手动定位图标就出来了

 

idea  中文ascii码自动转换

setting -> file Encodings -> Defalut encoding for properties files 选择 UTF-8, 勾选 Transparent native-to-ascii conversion

 

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值