[Python development tools] Pycharm's shortcut keys

Source: Internet
Author: User
Tags what parameter

[Python development tools] Pycharm's shortcut keys


Global search: ctrl+shift+f, but pycharm more powerful, you can click on the left side of a directory and then press ctrl+shift+f, so the default will be searched directory; Tip: If you just want to highlight the file, Simply selecting Project Navigator and typing directly will automatically highlight all matching files;


Add Comment: ctrl+/, and then press again to uncomment


Refactoring Refactor: ctrl+alt+shift+t

Sometimes the code is very long, found that the original file name is not reasonable, manual modification needs to traverse all the reference place? Then select the corresponding File/folder, after ctrl+alt+shift+t select Rename; If the file directory classification is unreasonable want to move, select Move; If you select any variable or constant in the code, function name, and so on, select Rename, automatically help you to change all references to the place and definition, and provide the preview function to ensure that there is no mistake to modify some places.


Auto PEP8 style: ctrl+alt+l

An eyeful of wavy lines prompts you to use the code when the style is confusing, the world is pure;


Smart correction : alt+enter

The module that corresponds to import (install) is used in the name of the import (install) module, which avoids running to the top of the code to write import;

Use a complement comment on the method name and use it in the test to help you add the assertion code ... No matter what error, do not know how to do, know what to do when you press this shortcut key, there are surprises!


Run current file: ctrl+shift+f10

Very smart, if it is a test code, run in test mode, and list the test pass condition


Check Note (docstring): ctrl+q


Check the definition (source code): ctrl+b/ctrl+i


View parameters: ctrl+p

If you press inside the parentheses, you know what parameter the current position is given.


Another line: shift+enter

The cursor can be placed in a row anywhere in the line without destroying the row structure;


Copy Current line: ctrl+d


Delete Current line: ctrl+x


Pop-up common snippet: *ctrl+j

For example: if name = = "Main":


Search everything: Double-clickshift

Search everything, whether it's IDE features, files, methods, variables ... We can search.



When you hold down CTRL and the mouse moves over the identifier, some hints are displayed.

When you hold down CTRL and click, you can jump to the definition or the box lists all references, and there is only one place where the reference will jump directly


Recently opened files: ctrl+e


Smart Fill tab:

This should all know, add one, enter a.print and press TAB to have a surprise


Surround with: ctrl+alt+t

For example, the cursor is located in the statement or block with try...except ... Wrap it up.


Extend Selection: ctrl+w

Extend the selection range outward. I usually use the word, two quotation marks or parentheses between the contents.


Surround selection on typing quote or brace:

This is a setting, set up a lot of convenience, ctrl+shift+a search smart keys, check the surround selection on typing quote or brace, so that you select the text after the quotation marks or brackets or automatically add to both sides of the head, without is the replacement text;

[Python development tools] Pycharm's shortcut keys

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.