IDEA operation skills and shortcut keys

1. Quick switching: Go back to the file you just edited, quickly view the historical edit list, and locate the location of the recently modified code:

The shortcut keys for forward/backward edited files are as follows:

  • Windows: Ctrl + Alt + ← / → (arrow keys)
  • Mac: ⌘ + ⌥ + ← / → (arrow keys)

The shortcut keys for the history editing file list are as follows:

  • Windows:ctrl + E
  • Mac: ⌘ +E

The shortcut keys for locating the location of recently modified code are as follows:

  • Windows:ctrl + shift + E
  • Mac: ⌘ + ⇧ +E

2. Automatic code completion (installing the aiXcoder plug-in for completion is more useful)

Automatic code completion shortcut keys ( automatically complete semicolons at the end of the code, bracket pairs, etc.) :

  • Windows:ctrl + shift + Enter
  • Mac:⌘ + ⇧ +⏎

 new object automatically creates variables and assigns values

  • Windows:ctrl + alt + V
  • Mac:⌥ + ⌘ + V


No matter where the cursor is now, just open a new line

shift enter

3. Rename (all places where this variable/function/class is used will be modified):

Rename the shortcut keys as follows:

  • Windows:shift + F6
  • Mac: ⇧ + F6

4. Other commonly used shortcut keys:

Ctrl+Alt+T, you can surround a piece of code with try/catch, if/else, etc.

Alt+Insert can generate constructors/Getters/Setters, etc. (use lombok, it is more convenient and concise to use @Data, @AllArgsConstructor, @NoArgsConstructor, etc.)

Ctrl+Alt+L, format code

Ctrl+Enter, import package, automatic correction

Ctrl+~ can quickly select themes, etc.

Ctrl+Shift+A Enter gitclone and select clone

Ctrl+P can display parameter information

Ctrl+X, delete line

Ctrl+D, copy line

Ctrl+Enter, insert a line above

"!", negative completion, press the "!" key when entering an expression

Shift+Click to close the file

Ctrl+F12, you can display the structure of the current file

Ctrl+F7, you can query the reference of the current element in the current file, and then press F3 to select

Ctrl+N, you can quickly open the class

Ctrl+Shift+N, you can quickly open files

Alt+Q, you can see the declaration of the current method

Ctrl+Shift+Insert, you can select the clipboard content and insert it

Ctrl+Alt+I will automatically indent the selected code. This function can also work when editing JSP files.

Ctrl+Alt+O, optimize imported classes and packages

Ctrl+Shift+Space, automatically complete code

Ctrl+space, code prompt (conflicts with system input method shortcut keys)

Ctrl+Shift+Alt+N, find methods or variables in a class

Alt+Shift+C, recent changes

Alt+Shift+Up/Down, move up/down one line

Shift+F6, Refactor – Rename

Ctrl+/ or Ctrl+Shift+/, comment (// or /**/)

Ctrl+J, automatic code (for example: serr)

Ctrl+Alt+J, wrap with dynamic template

Ctrl+H, display class structure diagram (inheritance hierarchy of classes)

Ctrl+Q, show comment document

Alt+F1, find the location of the code

Alt+Up/Down, quickly move positioning between methods

Ctrl+Shift+Up/Down, move statements up/down

Ctrl+Alt+Space, class name is automatically completed

Ctrl+Alt+Up/Down, quickly jump to search results

Ctrl+Shift+J, merge two lines

Ctrl+Shift+U, case conversion

Ctrl+Y, delete the current line

Shift+F6, rename

F6, move

F5, copy

Alt+Delete, safe deletion

Ctrl+F, find

Ctrl+R, replace

F3, find next

Shift+F3, find the previous one

Ctrl+Shift+F, find in path

Ctrl+Shift+R, replace in path

Guess you like

Origin blog.csdn.net/qq_36369267/article/details/118722648