Pycharm tutorial (5) Python shortcut settings, pycharmpython

Source: Internet
Author: User

Pycharm tutorial (5) Python shortcut settings, pycharmpython

Python shortcut key settings, details:

1. Subject

There is no doubt that Pycharm is an IDE with a powerful shortcut key system, which means that any operations in Pycharm, such as opening a file and switching the editing area, can be achieved through shortcut keys. Using shortcuts not only improves the operation speed, but also looks cool. However, if you are used to some shortcut keys, your fingers will get used to them and it will be difficult to change. This section describes how to customize Pycharm shortcut keys based on your habits, so that you can use them with ease.

The combination and usage of basic shortcut keys are not described here. For details, refer to using ing keyboard shortcuts or Keymap.

2. Select a shortcut key configuration Scheme

This step is very simple. Click the Settings button in the main toolbar and click Keymap in the Settings dialog box.

Select a shortcut key configuration scheme from the drop-down list on the corresponding page:

Click Save changes. For example, we have selected the Eclipse solution, so the shortcut key for deleting a row is the Ctrl + D we are used.

3. Change the shortcut key configuration scheme.

Here we will introduce how to change the configuration of the shortcut key.

Imagine the situation: you have selected the shortcut key configuration of the Emacs solution, but this configuration scheme does not define how to delete a row through the shortcut key in advance:

 

Suppose you want to set the shortcut key to Ctrl + D for this function. The operation is as follows:

(1) Click the Settings button in the main toolbar and click Keymap in the Settings dialog box.

(2) Select Emacs from the corresponding list.

(3) In the shortcut key function list below, expand the Editor Actions node and goDelete LineFunction.

(4) Right-click and select Add Keyboard Shortcut cut from the Shortcut menu.

(5) In the open Enter Keyboard Shortcut cut windowFirst StrokeEnter the shortcut key combination you want:

Note that when entering the expected shortcut key, all input from the keyboard will be recognized as the user's shortcut key settings. For example, if you want to set a shortcut key combinationCtrl + D,Press Ctrl and D at a time.

If you press the wrong key, you can only use the mouse pointer to delete the wrong input, because the input Backspace from the keyboard will also be recognized as a shortcut key.

(6) Next, pay attention to the system warning: the Ctrl + D shortcut key combination already exists, indicating that Pycharm has associated this shortcut key combination with other settings, fortunately, the previous settings are not commonly used. You can replace them, so click OK.

During replacement, Pycharm will give a warning:

(7) view the set shortcut key solution again:

You will find that the configuration scheme is automatically renamed as Emacs copy. This is because Pycharm does not allow users to change its predefined shortcut key configuration scheme, and only needs to change its copy file. Click application and close the dialog box.

Finally, test whether our changes take effect. Open a py file, move the cursor to the row to be deleted, and press Ctrl + D to delete the code.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.