IDEA的详解
这里主要是介绍idea常用快捷键、自动创建作者信息等配置,方便以后查阅!!!
一、Idea简介
- IDEA 全称IntelliJ IDEA,是用于java语言开发的集成环境(也可用于其他语言)
- IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的
- IDEA是JetBrains公司的产品,这家公司总部位于捷克共和国的首都布拉格,开发人员以严谨著称的东欧程序员为主
二、常用快捷键
1、周围应用切换
ate+数字
2、项目文件跳转
项目之间跳转
ctr+ate+[
ctr+ate+]
文件之间跳转
ctr+E
3、浏览修改位置跳转
修改过的位置跳转
ctr+shift+Backspace
浏览过得位置跳转
ctr+alt+方向左右键
4、列操作
多行列选中:
在 edit -> find ->sellect All Occurences
ctr + shift + ate + J
首行:home
尾行:end
一个单词一个单词的移动: ctr + 方向左右键
选中一个单词: ctr + shift + 方向左右键
5、代码小助手
定义变量
live templates
定义方法
postfix
6、重构
rename -变量
在该方法区域选中所有该单词:refactor -> rename
shift + F6
7、git的集成
annotate
local history
8、其他操作
复制文件名
ctr + shift + c
结构图
类的调用方法结构图:ctr + F12
类结构图:ctr+shift+alt+U;
ctr+h
三、快捷键汇总
- ctrl+shift+alt:多行操作
- psvm:生成main()方法;
- fori:生成for循环;
- Ctrl+Alt+v:自动补齐返回值类型
- ctrl+o:覆写方法
- ctrl+i:实现接口中的方法
- ctrl+shift+u:大小写转换
- CTRL+SHIFT+Z:取消撤销
- Alt+Insert:生成构造方法、getter、setter
- ctrl+y:删除当前行
- Ctrl+Shift+J:将选中的行合并成一行
- ctrl+g:定位到某一行
- Ctrl+Shitft+向下箭头:将光标所在的代码块向下整体移动
- Ctrl+Shift+向上箭头:将光标所在的代码块向上整体移动
- Alt+Shift+向下箭头:将行向下移动
- Alt+Shift+向上箭头:将行向上移动
- Ctrl+F:在当前文件中查找
- Ctrl+R:替换字符串
- Ctrl+Shift+F:在全局文件中查找字符串
- Ctrl+Shift+R:在全局中替换字符串
- Ctrl+Shift+Enter:自动补齐{}或者分号;
- Shift+Enter:在当前行的下方开始新行
- Ctrl+Alt+Enter:在当前行的上方插入新行
- Ctrl+Delete:删除光标所在至单词结尾处的所有字符
四、创建springboot项目地址
https://start.aliyun.com/
五、配置自动创建类作者信息
创建类时创建作者信息:
setting——>Editor——>File and Code Templates里面的include中——> 添加
完整信息
/**
* @projectName ${PROJECT_NAME}
* @className ${NAME}
* @author wangLin
* @date ${YEAR}-${MONTH}-${DAY} ${DAY_NAME_SHORT}
* @time ${TIME}
* @description TODO
* @version 1.0
*/
/**
* @author 王林
* @date ${YEAR}-${MONTH}-${DAY} ${DAY_NAME_SHORT}
* @time ${TIME}
* @description
* @version 1.0
*/
常用信息
/**
* @author wanglin
* @date ${YEAR}-${MONTH}-${DAY} ${DAY_NAME_SHORT}
* @time ${TIME}
* @description
* @version 1.0
*/
六、配置方法注释
在方法上添加注释信息:
setting——>Editor——>live Templates——> 添加
*
* @Description: $description$
* @Param: $params$
* @return: $returns$
* @Author: 王林
* @Date: $date$
*/
注意:要点击 EDIT Variables 进行脚本设置;
description
params methodParameters()
returns methodReturnType()
date date()
七、idea变量详解
这里直接贴出常用的预设的变量
${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.
关注林哥,持续更新哦!!!★,°:.☆( ̄▽ ̄)/$:.°★ 。