Teach you to configure the most beautiful PyCharm interface, a must for Python programmers!


The high-quality and beautiful IDE interface is the dream of every programmer!

With the rise of artificial intelligence/machine learning, Python has once again gained the attention of programmers as a "beautiful language". And PyCharm by JetBrains is undoubtedly one of the best Python IDEs.

As the saying goes, "If you want to do a good job, you must first sharpen your tool." Configuring your IDE to be both compelling and beautiful is a must-have skill for every Python programmer. This article will teach you step by step how to configure your PyCharm to look better! Definitely more practical than most tutorials online!

PyCharm, Python development tool!

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 it feels cooler.

Modification method: Enter PyCharm, File ==> Appearance&Behavior ==> Appearance, find the Theme item on the right, and replace it with Darcula .

Edit theme

The second step is to modify the font and change to a better-looking font

Modification method: Enter PyCharm, File ==> Editor ==> Colors & Fonts ===> Font, the Schema on the right can choose the font configuration, Monokai is recommended here. The Primary font below is the specific font used, but it cannot be modified directly. You need to click on the Sava As... on the upper right side first , which is equivalent to copying a copy of the current font configuration, and then modifying 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 configuration, the default is Monokai copy, we just OK.

Choose font

Make a copy of the current font configuration

Step 3: Modify the font size and spacing

在第二步的基础上,我们选择字体并且调整字体的大小和间距。这个可以根据个人习惯来设置,我喜欢字大点,所以字体大小是20,间距1.1。

选择字体的大小和间距

第四步:调整颜色

注意!这步很关键!网上的其他教程,只有前三步!我觉得只有前三步还不够完美,为什么呢?

看看下图,这是一段具体的代码示例。

在这个配置下,个别文字看不清楚!

发现问题了吗?Python代码里面的注释在这个主题里是灰色的,方法的关键字参数是紫色的,这两种颜色在深色背景下看不清楚!虽然不是很严重,但是既然要改,就尽量做的完美!

解决方法:File ==> Editor ==> Colors & Fonts ===> Python,右侧面板找到“Line Comment”,在最右边一列的Foreground可以需改颜色。

在弹出的颜色选择框里可以选择颜色,也可以直接输入色值。这里我选择了明快的绿色。

修改注释的颜色,让其更明显

选择颜色

同样,通过修改“keyword argument”的颜色可以把关键字参数的颜色改掉。

如果你还有其他不满意的配色,都可以用这个方法改。

下图是最终的效果,怎么样,是不是美美哒!赶紧搞起来吧!

最终效果

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326715345&siteId=291194637