IDEA插件:IDE Features Trainer

1,513 阅读1分钟

via: tianyu94.com/2019/06/12/…

分享一个 IntelliJ IDEA 的实用学习插件。

plugins.jetbrains.com/plugin/8554…

实操教你用各种方便快捷的快捷键。

插件涉及的快捷键汇总

Editor Basics

  • Actions Ctrl + Shift + A
  • Comment Line Ctrl + /
  • Delete Line Ctrl + Y
  • Duplicate Ctrl + D
  • Move
    • Alt + Shift + /
    • Ctrl + Shift + Up (The whole method)
  • Collapse
    • Ctrl (+ Shift) + -
    • Ctrl (+ Shift) + +
  • Multiple Selections
    • Alt + J
    • Alt + Shift + J
    • Ctrl + Alt + Shift + J

Code Completion

  • Basic Completion
    • Ctrl + Space Active Basic Completion
    • Ctrl + Shift + Enter Complete statement
    • Ctrl + Space (twice) Deeper level of code completion(for static constants or methods)
  • Smart Type Completion
    • Ctrl + Shift + Space
    • Ctrl + Shift + Space (twice) for a return statement
  • Postfix Completion
    • . + <reserved word>
      • e.g. isOpen == true.if ==> if (isOpen == true) { ... }
  • Statement Completion Ctrl + Shift + Enter
  • Completion with Tab Ctrl + Space, and press Tab

Refactorings

  • Rename Shift + F6
  • Extract Variable/Field Ctrl + Alt + V
  • Extract Method Ctrl + Alt + M
  • Refactoring Basics
    • Ctrl + Alt + C to extract the selected expression into a constatn
    • Ctrl + Alt + M to extract the selected code block into a method
    • Ctrl + Alt + P to extract the selected expression into a parameter

Code Assistance

  • Code Formatting Ctrl + Alt + L
  • Parameter Info Ctrl + P
  • Quick Popups
    • Ctrl + Q
    • Ctrl + Shift + I to see definition of the symbol at the caret
  • Editor Coding Assistance
    • F2 to go to the next highlighted error in the file
    • Ctrl + F1 to see the error description
    • Alt + Enter
    • Ctrl + Alt + T Sorround with
    • Ctrl + Shift + F7 to highlight all usages of the symbol at the caret within the file

Navigation

  • Jump to Source F4
  • Declaration Ctrl + B
  • Implementation Ctrl + Alt +B
  • File Structure Ctrl + F12
  • Next/Previous Occurrences
    • Ctrl + F ==> Enter to find next, Shift + Enter for previous occurrences
    • Close search panel by pressing Escape and try to find next occurrence with F3, Shift + F3 in a back way