1. Code prompt enhancement:
.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2. Commonly used shortcut keys ( 代码提示
, 打印
, 注释
, 导包
, 格式化代码
, 查看继承关系
, 查找某个类/接口
, 光标回退上一个位置
)
■ Alt➕/: Code prompt
■ sout ➕Enter key: System.out.println()
[The default shortcut letter is syso, because we have enhanced the code prompt function: enter sout to print System.out.println(), and the one used in idea is sout]
■ Method comments (block comments): write /** above the method ➕Enter key
- Comment out a single line and press ctr+/ directly
- If you want to comment out something, first select all the content and press ctr+/
■ ctr➕shift➕o: Automatically import the package of the referenced class [It is recommended to prompt the package when referencing this class for the first time, so that errors will not occur when intelligently importing the first package]
■ Bug fix: Ctrl ➕ 1
■ Formatting code: Ctr ➕ Shift ➕F
■ View the inheritance relationship of a class/interface: move the cursor to the class or interface and press ctr ➕ t
■ View a class/interface: press ctr ➕ shift ➕ t, and then search
■ View a method: press ctr ➕ o and search
■ Movement of the cursor position when viewing source code:
alt➕left: The cursor returns to the previous position
alt➕right: The cursor returns to the next position
■ Select code vertically in eclipse [same as word]: (enter multiple lines of code vertically at the same time)
In eclipse, press alt + shift + a first, and then the cursor changes to '+'.