How to change color of block comment
How do you change the color of a block comment in python?
UPDATE: It seems to be controlled by the 'warning' setting for python colors. Shouldn't it get its own section?
UPDATE: It seems to be controlled by the 'warning' setting for python colors. Shouldn't it get its own section?
请先登录再写评论。
Three double quotes
"""
This is a multiline comment
It's awesome
"""
Editor / Color & Fonts / General / Code Inspections: Warning
color.
On my Mac Mountain Lion machine multiline comments looked ok in the default colour scheme but... on my Mac Lion machine there is an ugly brown/orange background behind these sorts of comments. It looks even worse because the whole line reverse highlights starting from the beginning """ and then stops at the the ending """, causing an unsightly jagged look to these areas of code, spreading right across the screen/monitor (see screenshot).
And then on my dark colour schemes, on my Mac Lion machine, the background is dark orange and underlined!! This make these areas of code appear absolutely ghastly - especially since they, as I say, highlight the whole line right up to the right hand edge of PyCharms's editor window. Imagine seeing huge chunks of jagged, orange background underlined lines running across the entire monitor/editor screen. When I finally stumbled upon the random setting that seems to control this, I was so relieved.
As for whether these are an official language feature or convention - I don't think it matters. PyCharm should support these commonly used multi line strings. They are used by practically all python programmers I know and most python code I read. Guido van Rossum (creator of Python) approves of these constructs https://twitter.com/gvanrossum/status/112670605505077248 and you can't argue with the creator of the language.
See discussion at http://stackoverflow.com/questions/7696924/multiline-comments-in-python/7696947#7696947 with 161 approval votes on the answer.
See screenshots below re what I was experiencing!
P.S. not sure why the screenshot isn't visible after posting it. Its still here when I edit this post. Url seems to be
screenshot
Hope this helps.
It was not entirely clear to me how to find the text color in the multiline comment docstring using triple quotes (""" """)
location: CTRL+ALT+S > Editor > Color Scheme > Language Defaults > Comments > Doc Comment > Text