Sublime Forum

Syntax highlighting for docstrings in Python

#1

I would like to change color of Docstrings in python. I have added this code:

{
“name”: “Docstrings”,
“scope”: “comment.block.documentation.python”,
“foreground”: “red”,
}

But only quotation marks are changed to red color:

0 Likes

#2

You can see the scope at the current cursor position using Tools > Developer > Show Scope Name from the main menu. A proper scope selector for Python docstrings would be source.python comment.block.documentation.

1 Like