在PyCharm中为不同的行注释定义样式

时间:2017-06-30 09:43:36

标签: pycharm

我想为特殊评论定义新风格,例如:

# this comment is in red
## this comment is in blue

或者甚至可能是这样的:

# -------------------------------------
# color such 3-line comment with green
# -------------------------------------

在PyCharm中有可能吗?

1 个答案:

答案 0 :(得分:0)

不完全是,但你可以使python Docstring与python Line Comment的颜色不同。

Settings->Editor->Color Scheme->Python->Docstring->Click the box to the right of foreground->Choose red

Settings->Editor->Color Scheme->Python->Line Comment->Click the box to the right of foreground->Choose blue

然后你最终会......

"""
I 
am 
the color Red!
"""

# I 
# am 
# the color Blue!