In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what are the shortcut keys in pycharm". In daily operation, I believe that many people have doubts about the shortcut keys in pycharm. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what are the shortcut keys in pycharm?" Next, please follow the editor to study!
1. View all the members in the py file and quickly navigate to the code block
If you have more than 200 lines of py file code, be sure to use this method, which can greatly improve your code search efficiency.
Method 1:
(1) use Alt+1 to open the Project floating window
(2) Click the third gear icon in the upper right corner of the Project window: "Show Options Menu", and check "Show Members", so that the py file members of all projects in Project are displayed. Click on the members to quickly locate the code block.
Method 2:
(1) use Alt+7 to open the Structure floating window
(2) Click the py file in the Project window, and all the methods in the file will be displayed in the Structure window. Click the method name to quickly locate it.
2. Quickly locate the definition of classes, methods, and functions
Method 1RutCtrlPlus mouse click
(1) hold down the Ctrl key and click the class instantiation name, the method reference name and the function reference name with the mouse to quickly locate the definition.
Method 2:Ctrl+B
(1) move the cursor to the class instantiation name, the method reference name, and the function reference name, and press Ctrl+B to quickly locate the definition.
Method 3: right-click menu
(1) move the cursor to the class instantiation name, the method reference name, and the function reference name, and click the right mouse button to select "Go To"-> "Declaration or Usages"
3. Globally modify the method / function name
Method 1: reconstruct the command
(1) move the cursor over the method / function name, click the right mouse button and select "Refactor"-> "Change Signatrue...", or directly use the Ctrl+F6 shortcut key to open "Change Signatrue..." Window
(2) Type a new method / function name in the Name text box and click "Refactor" to modify it globally.
Method 2: find the replace command
(1) use Ctrl+Shift+r to open the "Replace in Path" window
(2) enter the string to be replaced and the replacement string, and click "Replace All"
4, collapse and expand the file structure
Method 1: collapse and expand the code block where the current cursor is located
(1) use Ctrl+ minus sign: collapse the current code block
(2) use the Ctrl+ plus sign to expand the current code block
Method 2: collapse and expand the code block step by step
(1) use Ctrl+Alt+ minus sign: press up several times to collapse the current code block step by step
(2) use the Ctrl+Alt+ plus sign: press down several times to expand the current code block step by step
Method 3: collapse and expand the code block at once throughout the file
(1) use Ctrl+Shift+ minus sign: collapse all code blocks in the current file
(2) use Ctrl+Shift+ plus sign: expand all code blocks in the current file.
5, quickly comment and uncomment single multiline code block
Method 1:
(1) Select the code block that needs to be commented, press and hold Ctrl+/, to select the selected line to be commented, and press Ctrl+/, again to cancel the comment
6. Quickly indent code blocks as a whole
Method 1: move to the right
(1) Select the code block, press Tab once, and move four characters to the right as a whole
Method 2: move to the left
(1) Select the code block, press Shfit+Tab once, and move four characters to the left as a whole
7, quickly format the code block
Method 1:
(1) Click the "Code" menu-> Reformat Code, or use the key combination Ctrl+Alt+L
Method 2
(1) Click "Code" menu-> Show Reformat File Dialog, select the option to be formatted, and click "Run".
At this point, the study of "what are the shortcut keys in pycharm" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.