宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

这篇文章主要讲解了“Idea的快捷键及环境配置”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Idea的快捷键及环境配置”吧!

快捷键

双击shift  查找文件

ctrl + shift + f 查找全局

ctrl + e 最近修改的文件

ctrl + shift + v 打开剪贴板

ctrl + alt + h 

ctrl + alt + m 抽取方法

ctrl + d 复制当前行到下一行

shit + enter 另起一行

alt + shift + x 关闭所有标签页

ctrl + shift + c 打开剪贴板

Ctrl+Alt+L 格式化代码

intellij idea 替换字符串功能有2个快捷键

ctrl+r

ctrl+shift+r

分别是替换本页内容和在多个文件中替换内容

shift + F6 重命名文件名、变量名

ctrl + p 参数提示

alt + /

配置文件idea64.exe.vmoptions
-Xms128m, 16 G 内存的机器可尝试设置为 -Xms512m
设置初始的内存数,增加该值可以提高 Java 程序的启动速度。 )
-Xmx750m, 16 G 内存的机器可尝试设置为 -Xmx1500m
设置最大内存数,提高该值,可以减少内存 Garage 收集的频率,提高程序性能)
-XX:ReservedCodeCacheSize=240m, 16G 内存的机器可尝试设置为-XX:ReservedCodeCacheSize=500m
保留代码占用的内存容量)

取消更新
Idea的快捷键及环境配置-风君子博客

鼠标滚轮改变字体大小

Idea的快捷键及环境配置-风君子博客

导包 alt + enter
Idea的快捷键及环境配置-风君子博客

add unambiguous imports on the fly 动态添加明确的导入

方法间分隔符
Idea的快捷键及环境配置-风君子博客

提示忽略大小写
Idea的快捷键及环境配置-风君子博客

多行显示编辑页签
Idea的快捷键及环境配置-风君子博客

字体
Idea的快捷键及环境配置-风君子博客

编辑区字体和控制台字体
Idea的快捷键及环境配置-风君子博客

注释字体
Idea的快捷键及环境配置-风君子博客

Doc Comment Text 修改文档注释的 字体 颜色
Block comment 修改多行注释的字体颜色
Line comment 修改当行注释的字体颜色

多个导入包用*替换
Idea的快捷键及环境配置-风君子博客

类头的文档注释信息
Idea的快捷键及环境配置-风君子博客

常用的预设的变量

${PACKAGE_NAME}
the name of the target package where the new cla ss 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.
/**
* @author Xxx
* @date ${DATE} ${TIME}
* @create ${YEAR}-${MONTH}-${DAY} ${TIME}
*@Date: ${DATE} ${TIME}
*/

@version 创建时间:${date} ${time}

/**
* @author
*@creator Xxx
* @date ${YEAR}-${MONTH}-${DAY} ${TIME}
*/

编码
Idea的快捷键及环境配置-风君子博客

Transparent native to ascii conversion 主要用于转换 ascii ,一般都要勾选,不然 Properties 文件中的注释显示的都不会是中文。

自动编译
Idea的快捷键及环境配置-风君子博客

compile independent modules in parallel 并行编译独立模块
 

如果没有代码提示,则去掉勾选省电模式Power Save Mode
IntelliJ IDEA 有一种叫做 省电模式 的状态,开启这种模式之后,IntelliJ IDEA 会关掉代码检查和代码提示等功能。所以一般也 可 认为这是一种 阅
读模式 ,如果你在开发过程中遇到突然代码文件不能进行检查和提示 可以来看看这里是否有开启该功能。
 

注解方式Servlet模版:
Idea的快捷键及环境配置-风君子博客

Idea的快捷键及环境配置-风君子博客

Idea的快捷键及环境配置-风君子博客

Idea的快捷键及环境配置-风君子博客

模板Templates
Editor Live Templates 和 Editor General Postfix Completion
二者的区别:Live Templates 可以自定义,而 Postfix Completion 不可以。同时,有些操作二者都提供了模板,Postfix Templates 较 Live Templates 能快 0.01 秒

举例: 
1. psvm : 可生成 main 方法 
2. sout : System.out.println) 快捷输出 
类似的: 
soutp=System.out.println“方法形参名 = ” + 形参名); 
soutv=System.out.println“变量名 = ” + 变量); 
soutm=System.out.println“当前类名.当前方法”); “abc”.sout => 
System.out.println“abc”); 
3. fori : 可生成 for 循环 
类似的: 
iter:可生成增强 for 循环 itar:可生成普通 for 循环 
4. list.for : 可生成集合 list 的 for 循环 
List list = new ArrayList); 
输入: list.for 即可输出 
forString s:list){ 

又如:list.fori 或 list.forr 
5. ifn:可生成 ifxxx = null) 
类似的: 
inn:可生成 ifxxx != null) 或 xxx.nn 或 xxx.null 
6. prsf:可生成 private static final 
类似的: 
psf:可生成 public static final 
psfi:可生成 public static final int 
psfs:可生成 public static final String

修改模版
Idea的快捷键及环境配置-风君子博客
Idea的快捷键及环境配置-风君子博客
Idea的快捷键及环境配置-风君子博客
 

tomcat
Idea的快捷键及环境配置-风君子博客

Idea的快捷键及环境配置-风君子博客
 

从中央仓库安装gsonformat
Idea的快捷键及环境配置-风君子博客

debug
Idea的快捷键及环境配置-风君子博客

Idea的快捷键及环境配置-风君子博客

清除缓存
Idea的快捷键及环境配置-风君子博客
自动更新检查
Idea的快捷键及环境配置-风君子博客