Idea Shortcut Guide: Let your development efficiency increase

If the instructions are not written, it means that there are no special precautions and it can be used directly.

  • Ctrl + Shift + A

    • Description: IDEA defines all operations that can be performed as action, which is an action. It defines a lot of shortcut keys, so using this shortcut key, you don't need to remember the shortcut key, you only need to enter the English of the operation you want, and you can quickly find the operation you want to perform.

    • Note: After checking  Include non-project items , the search scope will include dependent jar packages

The shortcut keys below are all based on the  windows platform, of course,  Mac there are also corresponding shortcut keys, you need to find them in the list.

Useful to view source thief

  • Ctrl + E

    • Description: Open the list of recently viewed files in the current project

  • Ctrl + Alt + 左右键

    • Note: Add key to jump to the last browsed file of the current project

    • Note: Add key to jump to the file to be viewed next time in the current project

  • Ctrl + N

    • Description: Enter the class name by default, search for the specified class in the current project;

    • Note: After checking  Include non-project items , the search scope will include dependent jar packages

  • Ctrl + Shift + N

    • Description: Enter the file name (including the suffix) by default, and search for the specified file in the current project;

    • Note: After checking  Include non-project items , the search scope will include dependent jar packages

  • Ctrl + Alt + Shift + N

    • Description: Enter the function name/variable name by default, search for the specified function/variable in the current project;

    • Note: After checking  Include non-project items , the search scope will include dependent jar packages

  • Ctrl + Shift + F

    • Description: Search for a string globally; you can specify whether to match case, whether it is a word, whether to enable regular expressions, and limit the type of file to be searched

    • Use: Enter keywords in the pop-up search box

  • Ctrl + F12

    • Description: The list shows the 变量f sum of the  current class 方法m

  • Ctrl + Alt + Shift + U

    • Use Ctrl +  here  F to search and locate the position of a dependency in the structure diagram;

    • Double-click the dependent node to jump to the place where the dependent is defined;

    • Shift +  Del You can delete the connection relationship between the dependency and its previous node, that is  <exclusion></exclusion>.

    • Description: View the structural relationship diagram between the methods involved in the current class

    • Description: View   the structural relationship diagram between the packages pom referenced in the file  jar;

  • Alt + F7

    • Description: Check where the method/variable where the cursor stays is called

    • Use: select the class name or method name to be queried, etc.

  • Ctrl + H

    • Description: Check who called the current method/who it called

make a mark

  • F11

    • Description: bookmark the line of code where the cursor is currently staying

  • Ctrl + F11

    • Description: bookmark and number the line of code where the cursor is currently staying

  • Ctrl + 数字/字母

    • Note: Use the Ctrl +  数字/字母 key combination for the numbered bookmarks  to quickly jump to the corresponding label

  • Shift + F11

    • Description: Open all bookmark lists

  • Alt + Shift + F

    • Description: Favorites

    • Use: When the cursor is placed on the class name, the collection is the current class; when the cursor is placed on the function method name, the collection is the current function. The default is to bookmark under the favorites of the current project name, and you can add favorites yourself.

When writing code, switching is quite convenient

  • Used when opening project projects in multiple windows

    • Ctrl +  Alt +  ] Switch to the next project

    • Ctrl +  Alt +  [ Switch to the previous project

  • Ctrl + Shift + E

    • Description: Open the list of recently modified files of the current project

  • Alt + Shift + C

    • Description: Open the list of operations performed recently in the current project; and click the corresponding operation to view which files have been modified

  • Ctrl + Shift + Backspace

    • Description: Jump to the last edited file of the current project

Essentials for editing code

  • Alt + window 编号

    • Description: Jump to the window area

  • Esc

    • Return to the code editing area

  • Shift + F6

    • Description: Globally modify (refactor) class name/variable name

    • Use: select the name of the class to be modified in the originally created class (cannot be modified in the reference place)

  • Shift + Alt + u

    • Note: Automatically convert the names that are not in camel case format to camel case;

    • Use: IDEA is required to install the CamelCaseplug-in

  • Ctrl + Shift + u

    • Description: Convert all selected words to uppercase or lowercase

    • Use: No need to install plug-ins

  • Alt + Enter

    • Description: Smart tips: guide package, automatic correction, automatic function creation, interface implementation, word spelling, list replace, string format or build...

    • Use: follow the prompts to select the corresponding action operation

  • Shift + Enter

    • Description: Add a blank line at the next line of the line where the cursor is staying

  • Ctrl + Enter

    • Description: Add a blank line in the current line of the line where the cursor is staying

  • Ctrl + Shift + Space

    • Description: Auto-completion code

    • Use: Use the shortcut key to complete the code after the uncompleted code; if there is no context that can be completed, a code suggestion prompt will appear when you press it twice.

  • Ctrl + 左右键

    • Note: By default, the most recent word shall prevail. Move the cursor to the beginning or end of the word.

  • Ctrl + Shift + 左右键

    • Description: Select the most recent word or words

    • Use: move the cursor before or after the word that needs to be selected, for example: press Ctrl +  Shift +  左键to select one word by one word to the left

  • Alt + Shift + 上下键

    • Description: Move the line of code where the cursor is located up/down; or move multiple lines of code where the code block selected by the cursor is located up/down

  • Ctrl + D

    • Description: Copy the current line to the next line

    • Use: move the cursor to the line that needs to be copied, you can use it

  • Extract the data used multiple times to define

    • Ctrl + Alt + V

    • Description: Extracted and defined as a common variable

    • Ctrl + Alt + C

    • Description: Extracted and defined as a static variable

    • Ctrl + Alt + F

    • Description: Extracted and defined as a member variable

    • Ctrl + Alt + P

    • Description: Extract variables and define them as method parameters

    • Ctrl + Alt + M

    • Description: Extracted and defined as a new method

  • Ctrl + Alt + L

    • Description: Format code

    • Use: select the part of the code that needs to be formatted and use the shortcut key

  • Alt + 左右键

    • Note: Pressing the key means to jump to the file on the left of the file list opened in the editing area (relative to the file where the cursor is currently staying)

    • Note: press key, it means to jump to a file on the right side of the file list opened in the editing area

  • Alt + 上下键

    • Description: Add key to jump to the next method

    • Description: Add key to jump to the previous method

  • Ctrl + Alt + Shift + J

    • Description: Select all the same strings in the current file

  • F2

    • Description: directly position the cursor to the red prompt

Guess you like

Origin blog.csdn.net/qq_31905135/article/details/108983862