SoFunction
Updated on 2024-10-28

Pycharm Learning Tutorial (1) Customizing Appearance

Pycharm as a powerful Python IDE, in the process of using it, I feel that I have not been able to find a comprehensive and complete reference manual, so I decided to briefly translate the Pycharm tutorial on the official website and share it with you.

1. Preparation

First make sure you have Pycharm 2.7 or later installed (download address), please download the corresponding version according to your system platform when downloading.

2、How to choose the appearance of Pycharm

Pycharm has several predefined theme modes, the number of available themes depends on the type of operating system, you can refer to the appearance instructions (frame of reference) in the "Settings/Preferences" dialog box.

The specific settings for the background theme are as follows:

(1) In the main toolbar, click theto open "Settings/Preferences", and then click theframe of reference

(2) In the following dialog box, click the drop-down menu corresponding to "Theme", and then select a theme of your choice:

Notice the Reset button located in the upper right corner of the dialog at this point. If you change your attention, you can restore the previous settings by clicking on this button. Also when you move the mouse over the Apply button it will become available:

Of course you can also change other appearance settings such as fonts and font sizes, window properties, and so on.

3. Apply changes to the settings, it is recommended to restart the Pycharm software(For example, when you change the theme to Darcula, the effect after impact will be something like the following):

4, how to change the theme color of the edit box

After changing the theme background of Pycharm, you may still not be satisfied with the appearance of the editor, for example, you would like to change the document string to another color, the following describes how to change it:

First, we click again on the toolbar'sIcon into the "Settings/Preferences" dialog box, expand the "Editor" node, and then single price "Color and Font ", found that the system suggests that we currently can not change the predefined font theme, which means that we must first make a copy of it:

Click the "Save as" button and type in a new font frame name:

Now we find that our newly created font type becomes editable and we can modify it to our liking.

Expand the Color and Font node to enter the Editor Settings dialog:

First, in the drop-down list of the language space, click to select the font type of the current document string, through the preview window we can simply preview the visual effect of the current settings.

It is worth mentioning that if you want to change the font color from dark green to another color, just check the "Foreground" checkbox and right-click or double-click on the color block on the right:

Next choose to select a color from the color palette that pops up again:

OK, the settings are applied and we find that the color we selected is successfully used for the display of the font:

5. The difference between software themes and edit box font themes

Note the difference between the two themes, the former is related to the whole software, while the latter is just a property change applied to the edit box section. It is possible to set the theme of the IDE to a bright color (e.g. Default or Alloy) and set the edit box to a dark theme (e.g. Twilight or Monokai). Pycharm's controls are shown in bright colors and the editing window is shown in dark colors:

This is the entire content of this article.