With the rise of artificial intelligence/machine learning, Python has once again gained the attention of a wide range of programmers. And PyCharm by JetBrains is undoubtedly one of the best Python IDEs.
Arranging your IDE equipment to be both stylish and elegant is a must-have technology for every Python. This article will teach you how to make your PyCharm equipment more beautiful! Definitely more practical than most tutorials online!
The first step, change to a dark background to protect your eyesight
The default background of PyCharm is white, which is dazzling. It's better to change to a dark color and feel cooler.
Adaptation: Enter PyCharm, File ==> Appearance&Behavior ==> Appearance, find the Theme item on the right, and replace it with Darcula.
The second step is to modify the font and change to a more elegant font
Modification: Enter PyCharm, File ==> Editor ==> Colors & Fonts ===> Font, the Schema on the right can choose the font configuration, and Monokai is recommended here. The Primary font below is the detailed font used and cannot be directly modified. You must first click Sava As... on the upper right side, which is to make a copy of the current font assembly arrangement, and then modify it on the copy.
After clicking Sava As..., there will be a pop-up box for you to confirm the name of the new font assembly, the default is Monokai copy, we just OK indirectly.
Step 3: Change the font size and spacing
Basically in the second step, we choose the font and adjust the font size and spacing. This can be according to personal habits, I am interested in large fonts, so the font size is 20, and the spacing is 1.1.
Step 4: Adjust the Color
pay attention to! Other tutorials online, just the first three steps! I feel that the first three steps are not enough, why?
Take a look at the image below, which is a detailed example of python code.
See the problem? The explanation in the Python code is gray in this theme, and the Guan Jian word parameter of the method is purple, and these two colors are not clear on the dark background! Of course it's not very strict, but since you want to change it, try to do it perfectly!
Processing: File ==> Editor ==> Colors & Fonts ===> Python, find "Line Comment" in the right panel, and you can change the color in the Foreground in the far right column.
In the pop-up color selection box, you can select a color, or you can enter the color value indirectly. Here I chose bright green.
Similarly, changing the color of the "keyword argument" through the process can change the color of the keyword argument.
If you have other colors, you can use this method to change.