-
Hi! I've grown really attached to being able to set different colors for C++ comments (//) and document comments (///), and I'm looking to replicate that for python code (maybe ## or something). Glancing through LexPython, I don't see anything about document comments like I do in LexCPP. Is anyone aware of a way to achieve two different color of Python comments without modifying stock Geany? The best I have now is using triple-quoted blocks, but I find I don't use it because it's so many characters. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think there is a way to get two different comment colors without modifying the lexer code and Geany's styling. However, the "pythonic" way is using triple-quoted strings (or well, I guess any string will do, but usually documentation is longer than that) as the first statement in e.g. a function. You can then access this in the def foo():
"""This fooes around"""
return 0xf00
print(foo.__doc__) |
Beta Was this translation helpful? Give feedback.
I don't think there is a way to get two different comment colors without modifying the lexer code and Geany's styling.
However, the "pythonic" way is using triple-quoted strings (or well, I guess any string will do, but usually documentation is longer than that) as the first statement in e.g. a function. You can then access this in the
__doc__
property of the associated symbol.