IDEA的详解

IDEA的详解

这里主要是介绍idea常用快捷键、自动创建作者信息等配置,方便以后查阅!!!

一、Idea简介

  1. IDEA 全称IntelliJ IDEA,是用于java语言开发的集成环境(也可用于其他语言)
  2. IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的
  3. 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

三、快捷键汇总

  1. ctrl+shift+alt:多行操作
  2. psvm:生成main()方法;
  3. fori:生成for循环;
  4. Ctrl+Alt+v:自动补齐返回值类型
  5. ctrl+o:覆写方法
  6. ctrl+i:实现接口中的方法
  7. ctrl+shift+u:大小写转换
  8. CTRL+SHIFT+Z:取消撤销
  9. Alt+Insert:生成构造方法、getter、setter
  10. ctrl+y:删除当前行
  11. Ctrl+Shift+J:将选中的行合并成一行
  12. ctrl+g:定位到某一行
  13. Ctrl+Shitft+向下箭头:将光标所在的代码块向下整体移动
  14. Ctrl+Shift+向上箭头:将光标所在的代码块向上整体移动
  15. Alt+Shift+向下箭头:将行向下移动
  16. Alt+Shift+向上箭头:将行向上移动
  17. Ctrl+F:在当前文件中查找
  18. Ctrl+R:替换字符串
  19. Ctrl+Shift+F:在全局文件中查找字符串
  20. Ctrl+Shift+R:在全局中替换字符串
  21. Ctrl+Shift+Enter:自动补齐{}或者分号;
  22. Shift+Enter:在当前行的下方开始新行
  23. Ctrl+Alt+Enter:在当前行的上方插入新行
  24. 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.

关注林哥,持续更新哦!!!★,°:.☆( ̄▽ ̄)/$:.°★ 。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
10-28 148

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值