进阶:下载主题使用
下载该主题的地址
idea更换主题,配置字体的教程参考
主题下好以后后缀为.jar 导入一下下好的主题,然后OK->OK->OK后IDEA会自动关闭,再手动打开则更换新主题成功
快捷键Ctrl+Shift+A打开如下窗口,搜索set选择SetBackgroud Image
选中代码块与光标所在行颜色如图:
效果如图:
参考自:idea中文字体改为雅黑和控制台乱码的解决
找到IDEA安装目录下的jre64-lib,新建文件,名称为:fontconfig.properties
加入以下代码
# Version
version=1
# Component Font Mappings
allfonts.chinese-ms936=Microsoft Yahei
allfonts.chinese-ms936-extb=Microsoft Yahei
allfonts.chinese-gb18030=Microsoft Yahei
allfonts.chinese-gb18030-extb=Microsoft Yahei
allfonts.chinese-hkscs=Microsoft Yahei
allfonts.chinese-ms950-extb=Microsoft Yahei
allfonts.devanagari=Mangal
allfonts.dingbats=Wingdings
allfonts.lucida=Lucida Sans Regular
allfonts.symbol=Symbol
allfonts.thai=Lucida Sans Regular
serif.plain.alphabetic=Times New Roman
# serif.plain.chinese-ms950=MingLiU
# serif.plain.chinese-ms950-extb=MingLiU-ExtB
serif.plain.chinese-ms950=Microsoft Yahei
serif.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.plain.hebrew=David
serif.plain.japanese=MS Mincho
serif.plain.korean=Batang
serif.bold.alphabetic=Times New Roman Bold
# serif.bold.chinese-ms950=PMingLiU
# serif.bold.chinese-ms950-extb=PMingLiU-ExtB
serif.bold.chinese-ms950=Microsoft Yahei
serif.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.bold.hebrew=David Bold
serif.bold.japanese=MS Mincho
serif.bold.korean=Batang
serif.italic.alphabetic=Times New Roman Italic
# serif.italic.chinese-ms950=PMingLiU
# serif.italic.chinese-ms950-extb=PMingLiU-ExtB
serif.italic.chinese-ms950=Microsoft Yahei
serif.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.italic.hebrew=David
serif.italic.japanese=MS Mincho
serif.italic.korean=Batang
serif.bolditalic.alphabetic=Times New Roman Bold Italic
# serif.bolditalic.chinese-ms950=PMingLiU
# serif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
serif.bolditalic.chinese-ms950=Microsoft Yahei
serif.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.bolditalic.hebrew=David Bold
serif.bolditalic.japanese=MS Mincho
serif.bolditalic.korean=Batang
sansserif.plain.alphabetic=Arial
# sansserif.plain.chinese-ms950=MingLiU
# sansserif.plain.chinese-ms950-extb=MingLiU-ExtB
sansserif.plain.chinese-ms950=Microsoft Yahei
sansserif.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.plain.hebrew=David
sansserif.plain.japanese=MS Gothic
sansserif.plain.korean=Gulim
sansserif.bold.alphabetic=Arial Bold
# sansserif.bold.chinese-ms950=PMingLiU
# sansserif.bold.chinese-ms950-extb=PMingLiU-ExtB
sansserif.bold.chinese-ms950=Microsoft Yahei
sansserif.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.bold.hebrew=David Bold
sansserif.bold.japanese=MS Gothic
sansserif.bold.korean=Gulim
sansserif.italic.alphabetic=Arial Italic
# sansserif.italic.chinese-ms950=PMingLiU
# sansserif.italic.chinese-ms950-extb=PMingLiU-ExtB
sansserif.italic.chinese-ms950=Microsoft Yahei
sansserif.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.italic.hebrew=David
sansserif.italic.japanese=MS Gothic
sansserif.italic.korean=Gulim
sansserif.bolditalic.alphabetic=Arial Bold Italic
# sansserif.bolditalic.chinese-ms950=PMingLiU
# sansserif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
sansserif.bolditalic.chinese-ms950=Microsoft Yahei
sansserif.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.bolditalic.hebrew=David Bold
sansserif.bolditalic.japanese=MS Gothic
sansserif.bolditalic.korean=Gulim
# monospaced.plain.chinese-ms950=MingLiU
# monospaced.plain.chinese-ms950-extb=MingLiU-ExtB
monospaced.plain.chinese-ms950=Microsoft Yahei
monospaced.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.plain.hebrew=David
monospaced.plain.japanese=MS Gothic
monospaced.plain.korean=GulimChe
# monospaced.bold.chinese-ms950=PMingLiU
# monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bold.chinese-ms950=Microsoft Yahei
monospaced.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.bold.hebrew=David Bold
monospaced.bold.japanese=MS Gothic
monospaced.bold.korean=GulimChe
# monospaced.italic.alphabetic=Courier New Italic
# monospaced.italic.chinese-ms950=PMingLiU
# monospaced.italic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.italic.chinese-ms950=Microsoft Yahei
monospaced.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.italic.hebrew=David
monospaced.italic.japanese=MS Gothic
monospaced.italic.korean=GulimChe
# monospaced.bolditalic.chinese-ms950=PMingLiU
# monospaced.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bolditalic.chinese-ms950=Microsoft Yahei
monospaced.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.bolditalic.hebrew=David Bold
monospaced.bolditalic.japanese=MS Gothic
monospaced.bolditalic.korean=GulimChe
# style1: Consolas
monospaced.plain.alphabetic=Consolas
monospaced.bold.alphabetic=Consolas Bold
monospaced.italic.alphabetic=Consolas Italic
monospaced.bolditalic.alphabetic=Consolas Bold Italic
# style 2: Courier New
# monospaced.bolditalic.alphabetic=Courier New Bold Italic
# monospaced.italic.alphabetic=Courier New Italic
# monospaced.bold.alphabetic=Courier New Bold
# monospaced.plain.alphabetic=Courier New
dialog.plain.alphabetic=Arial
# dialog.plain.chinese-ms950=MingLiU
# dialog.plain.chinese-ms950-extb=MingLiU-ExtB
dialog.plain.chinese-ms950=Microsoft Yahei
dialog.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.plain.hebrew=David
dialog.plain.japanese=MS Gothic
dialog.plain.korean=Gulim
dialog.bold.alphabetic=Arial Bold
# dialog.bold.chinese-ms950=PMingLiU
# dialog.bold.chinese-ms950-extb=PMingLiU-ExtB
dialog.bold.chinese-ms950=Microsoft Yahei
dialog.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.bold.hebrew=David Bold
dialog.bold.japanese=MS Gothic
dialog.bold.korean=Gulim
dialog.italic.alphabetic=Arial Italic
# dialog.italic.chinese-ms950=PMingLiU
# dialog.italic.chinese-ms950-extb=PMingLiU-ExtB
dialog.italic.chinese-ms950=Microsoft Yahei
dialog.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.italic.hebrew=David
dialog.italic.japanese=MS Gothic
dialog.italic.korean=Gulim
dialog.bolditalic.alphabetic=Arial Bold Italic
# dialog.bolditalic.chinese-ms950=PMingLiU
# dialog.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialog.bolditalic.chinese-ms950=Microsoft JhengHei
dialog.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.bolditalic.hebrew=David Bold
dialog.bolditalic.japanese=MS Gothic
dialog.bolditalic.korean=Gulim
dialoginput.plain.alphabetic=Courier New
# dialoginput.plain.chinese-ms950=MingLiU
# dialoginput.plain.chinese-ms950-extb=MingLiU-ExtB
dialoginput.plain.chinese-ms950=Microsoft JhengHei
dialoginput.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.plain.hebrew=David
dialoginput.plain.japanese=MS Gothic
dialoginput.plain.korean=Gulim
dialoginput.bold.alphabetic=Courier New Bold
# dialoginput.bold.chinese-ms950=PMingLiU
# dialoginput.bold.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bold.chinese-ms950=Microsoft Yahei
dialoginput.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.bold.hebrew=David Bold
dialoginput.bold.japanese=MS Gothic
dialoginput.bold.korean=Gulim
dialoginput.italic.alphabetic=Courier New Italic
# dialoginput.italic.chinese-ms950=PMingLiU
# dialoginput.italic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.italic.chinese-ms950=Microsoft Yahei
dialoginput.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.italic.hebrew=David
dialoginput.italic.japanese=MS Gothic
dialoginput.italic.korean=Gulim
dialoginput.bolditalic.alphabetic=Courier New Bold Italic
# dialoginput.bolditalic.chinese-ms950=PMingLiU
# dialoginput.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bolditalic.chinese-ms950=Microsoft JhengHei
dialoginput.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.bolditalic.hebrew=David Bold
dialoginput.bolditalic.japanese=MS Gothic
dialoginput.bolditalic.korean=Gulim
# Search Sequences
sequence.allfonts=alphabetic/default,dingbats,symbol
sequence.serif.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.sansserif.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.monospaced.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.dialog.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.dialoginput.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.serif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.sansserif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.monospaced.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.dialog.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.dialoginput.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.serif.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.serif.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.serif.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,dingbats,symbol
sequence.allfonts.UTF-8.ja=alphabetic,japanese,devanagari,dingbats,symbol
sequence.allfonts.windows-1255=hebrew,alphabetic/1252,dingbats,symbol
sequence.serif.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.sansserif.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.monospaced.windows-31j=japanese,alphabetic,dingbats,symbol
sequence.dialog.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.dialoginput.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.serif.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.sansserif.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.monospaced.x-windows-949=korean,alphabetic,dingbats,symbol
sequence.dialog.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.dialoginput.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol
sequence.fallback=lucida,\
chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
japanese,korean,chinese-ms950-extb,chinese-ms936-extb
# Exclusion Ranges
exclusion.alphabetic=0700-1e9f,1f00-20ab,20ad-f8ff
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac
# Monospaced to Proportional width variant mapping
# (Experimental private syntax)
proportional.MS_Gothic=MS PGothic
proportional.MS_Mincho=MS PMincho
proportional.MingLiU=PMingLiU
proportional.MingLiU-ExtB=PMingLiU-ExtB
# Font File Names
filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF
filename.Courier_New=COUR.TTF
filename.Courier_New_Bold=COURBD.TTF
filename.Courier_New_Italic=COURI.TTF
filename.Courier_New_Bold_Italic=COURBI.TTF
filename.Times_New_Roman=TIMES.TTF
filename.Times_New_Roman_Bold=TIMESBD.TTF
filename.Times_New_Roman_Italic=TIMESI.TTF
filename.Times_New_Roman_Bold_Italic=TIMESBI.TTF
filename.SimSun=SIMSUN.TTC
filename.SimSun-18030=SIMSUN18030.TTC
filename.SimSun-ExtB=SIMSUNB.TTF
filename.MingLiU=MINGLIU.TTC
filename.MingLiU-ExtB=MINGLIUB.TTC
filename.PMingLiU=MINGLIU.TTC
filename.PMingLiU-ExtB=MINGLIUB.TTC
filename.MingLiU_HKSCS=hkscsm3u.ttf
filename.David=DAVID.TTF
filename.David_Bold=DAVIDBD.TTF
filename.MS_Mincho=MSMINCHO.TTC
filename.MS_PMincho=MSMINCHO.TTC
filename.MS_Gothic=MSGOTHIC.TTC
filename.MS_PGothic=MSGOTHIC.TTC
filename.Gulim=gulim.TTC
filename.Batang=batang.TTC
filename.GulimChe=gulim.TTC
filename.Lucida_Sans_Regular=LucidaSansRegular.ttf
filename.Mangal=MANGAL.TTF
filename.Symbol=SYMBOL.TTF
filename.Wingdings=WINGDING.TTF
控制台乱码的解决:
第一步:修改IDEA配置文件
在idea.exe.vmoptions和idea64.exe.vmoptions两个文件中分别添加:-Dfile.encoding=UTF-8
第二步:修改IDEA设置:
File-settings-FileEncoding,涉及到编码的地方全都配置成UTF-8
第三步:在部署Tomcat的VM Options项中添加:-Dfile.encoding=UTF-8
第四步:重启
main/psvm、sout、… 类中输入main或psvm回车自动补齐主函数,输入sout自动补齐输出语句
Home 光标移动到所在行的行首(Fn+左键)
End 光标移动到所在行的行的行尾(Fn+右键)
F2 快速定位到下一个错误和警告处,加Shift键,定位到上一个错误处
CTRL+/,CTRL+SHIFT+/ 选中多行后,Ctrl+/可以多个单行注释,或多行注释,若已经注释则取消注释
CTRL+D 复制当前行数据到下一行
CTRL+Y或+X或delete 删除光标所在行
CTRL+ALT+L 格式化代码(自动调整代码格式)
ALT +SHIFT+↑,ALT +SHIFT+↓ 上下移动当前代码
Ctrl+Shift+F12 放大窗口或缩小窗口,来回切换
快速选中光标所在行的4种方法
我们发现在在Setting下修改字符编码为UTF-8以后,再新建项目的编码依然为系统默认System……
File->Other Settings,新建java-04后查看编码发现修改成功。再创建项目默认都是utf-8
参考自IDEA上安装和使用JetBrains Mono字体(Windows)
下载官网
https://www.jetbrains.com/lp/mono/
参考自idea :插件Statistic 统计代码数量和行数
-插件功能
显示项目统计数量。
这个插件显示的是按扩展名排序的文件,以及大小、行数、LOC等。
用户可以选择统计(Project/Module/Package/File)范围,选择范围后需要点击Refresh,。
(这个插件需要Java1.8)
1、打开IDEA 菜单 View
2、选择 Tool window
3、点击 Statistic
4、可以看到不同类型文件的统计
5、refresh 重新统计
6、上面的tab 切换可以查看不同类型文件的统计
在本地文件夹D:\MyAll\MySofe\IntelliJ IDEA2018.2.5\IntelliJ IDEA 2018.2.5\plugins
新建statistic目录,将Statistic-3.4.1.jar下载到该目录:
卸载原最新版本Statistic插件
我们在使用idea时经常需要安装及删除插件,下面就介绍一下如何操作。 点击左上【File】后点击【Settings】打开。 在右边【Marketplace】显示所有插件。 点击搜索栏搜索我们要的插件,然后点击【Install】安装。 下载完后需要重启idea,重启完后就可以使用了。 如果要删除插件则切换到【Installed】,右键点击插件,选择【Unstall】就可以了。
卸载原最新版本Statistic插件 -> 重启IDEA -> File -> Settings -> Plugins -> 点击右上角的设置图标 -> Install Plugin from Disk -> 选择上面下载到本地的插件jar包 -> 重启IDEA