10 most time-saving pycharm skills

Source: Internet
Author: User

?

The most common use of pycharm in the work, after use can save us some completely unnecessary waste of time. Help everyone become a pycharm old driver.

add Vx:tanzhouyiwan or QQ group 813622576 free to receive learning materials

#0. Pycharm Common shortcut keys

?

?

# 1. View the Use library source code

?

Pycharm Master Programmer in StackOverflow replied

Often hear people say, read more source code. The source code can not only help us to understand the operating mechanism, but also to learn excellent library or framework of best practices.

When you call the library, you can easily jump to the definition of the class, method, function, and variable in the source code by clicking on command+b almost anywhere you are curious.

#2. Let your code PEP8

?

Do you strictly abide by the PEP8 specification when writing Python code? Still have to obey, otherwise the code to GitHub or know on the godless is not good. But if the naked eye to check and attention, too tired, rely on pycharm to do this thing good, command+option+l, a key pep8 walk.

#3. Novice no longer worrying about installing the library

?

If you are a novice, you may be bothered to install the library, you can use the familiar graphical interface in Pycharm to install the library, you don't have to get stuck in a bunch of command lines.

When we need to find a file name in the project, enter COMMAND + Shift + O, and then enter the file name you want to find. If you don't remember the full name, just enter the first letter and Pycharm will prompt you. For example I want to find a file called test_errors.py, then only need to input tee can be found. or query test_errors_1.py then only need to input tee1 can be found.

#5. Quickly select a block of code

How do you quickly annotate a block of Python code? Not a line of add # ...

When you need to select a function, just put the cursor at the front, and then click Command + Option + Shift + [, you can select the current code block, using COMMAND +/comment.

#6. Quick Insert Common Code

?

Sometimes you need to enter a very long code, such as if __name__ = = ' __main__ ':, when the manual input is not as direct as COMMAND + J, you can directly insert the common code.

#7. Run/debug Code

Running the code and debugging the code should be the most common shortcut for most people.

Mac:

Control + R: Run the current code directly

Control + D: Run code in debug mode

Windows/linux:

Shift + F10: Run the current code directly

Shift + F9: Running code in debug mode

#8. Indent your block of code

When writing a front-end page, you often want to change the indentation of a large piece of code, this time you can use the SHIFT + up and down to select the code block you want to indent, and then use the tab to indent.

#9. Expand/Shrink Code

When the project is written to a certain scale, inevitably the method/function will be many, this time we can use the COMMAND + Shift +-symbol to shrink the code, this is mainly for the convenience of viewing.

#10. Show multiple pages

?

When your company is reluctant to configure 2 displays for you, you can still use Pycharm to view multiple files in one screen. Mouse over the file name at the current navigation, then right-click split vertically or split horizontally.

add Vx:tanzhouyiwan or QQ group 813622576 free to receive learning Oh!?

10 most time-saving pycharm skills

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.