Unlock PyCharm’s secret weapon! Master these shortcut keys

Note: This article only records the use of some shortcut keys encountered in the process of using pycharm. It is not a learning article and will be continuously updated. If you also encounter some convenient shortcut keys, you are welcome to add it.

  1. Code editing
    1.  Ctrl + Space  : Code auto-completion
    2.  Ctrl + / : Comment/uncomment the current line or selected code block
    3.  Ctrl + D : Copy the current line or selected block of code
    4.  Ctrl + Y : Delete the current line or selected block of code
    5.  Ctrl + X : Cut the current line or selected block of code
    6.  Shift + Enter : Insert a new line below the current line
    7.  Shift + Tab : Reduce indentation
    8.  Alt + Shift + ↑  : Copy above the line
    9.  Alt + Shift + ↓  : Copy below the line
    10.  Tab : Increase indentation
  2. Code navigation
    1.  Ctrl + B : Jump to the definition of a variable, function or class
    2.  Ctrl + Alt + B : Jump to the implementation of a variable, function or class
    3.  Ctrl + E : Display a list of recently edited files
    4.  Ctrl + F12 : Display the structure (function, class, etc.) list of the current file
  3. Find and replace
    1.  Ctrl + F : Find
    2.  Ctrl + R : Replace
    3.  Ctrl + Shift + F : Find throughout the project
    4.  Ctrl + Shift + R : Replace throughout the project
  4. Refactoring
    1.  Shift + F6 : Rename a variable, function or class
    2.  Ctrl + Alt + M : Extract the selected code block into a function
    3.  Ctrl + Alt + V : Extract the selected code block into a variable
  5. debug
    1.  F8 : Execute code line by line
    2.  F9 : Resume execution of the program until the next breakpoint
    3.  Shift + F9 : Run the current file
    4.  Shift + F10 : Run the project
  6. navigation
    1.  Ctrl + E : Open the list of recently edited files
    2.  Ctrl + Shift + E : Open the list of recently viewed files
    3.  Ctrl + F12 : Display the structure (function, class, etc.) list of the current file
    4.  Ctrl + N : Quickly find classes
    5.  Ctrl + Shift + N : Find files quickly
  7. Code formatting
    1.  Ctrl + Alt + L : Format code

  • The cursor changed from | to  ▌ Solution

▌: The cursor has entered the rewrite state, while the opposite is the insert state.
In the insert state, it means that new content can be inserted in front of the cursor positioning point, and the subsequent content will not be replaced. If you enter the rewrite state and enter new content at the cursor positioning point, the content at the cursor positioning point will be replaced.

Solution : Use the insert key on the keyboard   to switch states  

Guess you like

Origin blog.csdn.net/LaityMm/article/details/131695824