慕课网 IntelliJ IDEA神器使用技巧(Windows)

无处不在的跳转

  • 项目之间的跳转
    Ctrl + Alt + ]下一个项目
    Ctrl + Alt + [ 上一个项目

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第1张图片
    项目之间的跳转

  • 快速查找快捷键
    Ctrl + Shift + A

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第2张图片
    Find Action

  • 最近打开过的文件
    Ctrl + E

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第3张图片
    Recent Files

也可以在 Find Action中快速查找快键键


慕课网 IntelliJ IDEA神器使用技巧(Windows)_第4张图片
Find Action
  • 最近修改过的文件
    Ctrl + Shif + E

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第5张图片
    Rencet Changed Files

  • 浏览修改位置的跳转
    Ctrl + Shift + Backspace

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第6张图片
    Last Edit Location

  • 浏览位置的跳转
    Back Ctrl + Alt + 向左箭头
    Forward Ctrl + Alt + 向右箭头

  • 书签 Bookmarks

慕课网 IntelliJ IDEA神器使用技巧(Windows)_第7张图片
bookmarks
  • 收藏文位置和文件
    Alt +2 调出Favorites窗口
    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第8张图片
    Favorites

Alt + Shift + F 新增一个收藏 可以收藏类和方法

慕课网 IntelliJ IDEA神器使用技巧(Windows)_第9张图片
Add to Favorites

慕课网 IntelliJ IDEA神器使用技巧(Windows)_第10张图片
Alt + Shift + F
  • 编辑区和文件区来回跳转
    Alt + 1

精准搜索


  • 慕课网 IntelliJ IDEA神器使用技巧(Windows)_第11张图片
    Ctrl + N

勾选以后,会把jar中的类也搜索出来


慕课网 IntelliJ IDEA神器使用技巧(Windows)_第12张图片
Ctrl + N Ctrl + N
  • 文件
    Ctrl + Shift + N

  • 符号(查找方法和属性)
    Ctrl + Alt + Shift + N

  • 字符串
    Ctrl + Shift + F 在指定目录下搜索字符串

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第13张图片
    Ctrl + Shift + F

代码小助手

  • 列操作
    Ctrl + Alt + Shift + J

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第14张图片
    Ctrl + Alt + Shift + J

  • live template

慕课网 IntelliJ IDEA神器使用技巧(Windows)_第15张图片
live template
  • postfix
    • for
    • sout
    • return
    • nn
慕课网 IntelliJ IDEA神器使用技巧(Windows)_第16张图片
postfix
  • Alter + Enter
    • 自动创建方法
    • list replace
    • 字符串format或者build
    • 实现接口
    • 单词拼写
    • 导包

编写高质量代码

  • 重构
    Shift + F6 重构变量
    Ctrl + F6 重构方法 change Signature 或者使用 alt+entry
慕课网 IntelliJ IDEA神器使用技巧(Windows)_第17张图片
refactor
  • 抽取
    抽取变量
    Ctrl+Alt+V
    Ctrl+Alt+C 抽取常量
    Ctrl+Alt+F 抽取成员变量
    Ctrl+Alt+P 抽取方法参数
    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第18张图片
    Ctrl+Alt+V

    抽取方法
    Ctrl + Alt + M

寻找修改轨迹

  • git的集成

    • annotate
    • 移动所有的改动之处
      Ctrl + Alt + Shift + 向上箭头
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第19张图片
      Ctrl + Alt + Shift + 向上箭头
    • 撤销,包括单个和项目改动之处
      Ctrl+Alt+Z
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第20张图片
      Ctrl+Alt+Z
  • local history


    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第21张图片
    local history

关联一切

  • spring的关联


    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第22张图片
    spring关联创建
慕课网 IntelliJ IDEA神器使用技巧(Windows)_第23张图片
spring 关联效果
  • 数据库的关联(importance)


    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第24张图片
    数据库关联

程序调试

  • 断点调试
    • 单步运行 F8
    • resume F9 运行到下一个断点
    • Ctrl + Shift + F8 查看所有的断点
    • 禁止所有的断点
    • 条件断点
    • 表达式求值 Alt + F8
    • 运行到指定行
    • setValue
  • run anywhere if you can
    • 运行 当前上下文
      需要配置快捷键


      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第25张图片
      运行 当前上下文
    • 在当前可运行列表中选择一个运行
      Alt + Shift + F9

其他操作

  • 文本操作
    • Ctrl+Shift+V 最近的剪切板
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第26张图片
      Ctrl+Shift+V
    • 复制文件路径
    • 复制文件名称
慕课网 IntelliJ IDEA神器使用技巧(Windows)_第27张图片
复制文件名称和路径
  • 结构图

    • Ctrl+F12 快速查看类结构
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第28张图片
      查看类结构
    • 查看Maven依赖


      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第29张图片
      查看Maven依赖
    • Ctrl+Alt+U 查看类图
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第30张图片
      Ctrl+Alt+U 查看类图
    • Ctrl + H查看类继承结构
      慕课网 IntelliJ IDEA神器使用技巧(Windows)_第31张图片
      Ctrl + H
  • Ctrl + Alt + H查看方法调用

    慕课网 IntelliJ IDEA神器使用技巧(Windows)_第32张图片
    Ctrl + Alt + H

你可能感兴趣的:(慕课网 IntelliJ IDEA神器使用技巧(Windows))