Sublime Forum

Multiline python doc string with treated as inline comment

#1

I am not sure if this is a ST3 bug or me just misusing it, but I have found this quite frustrating recently.

When attempting to comment out whole python functions, I have found that docstrings are first uncommented. For example, say I wanted to uncomment the following function by highlighting it and then hitting cmd+/. If I do this, I get the following effect:

Is this a bug or can I change something in my settings to distinguish such doc strings from normal comments?

Thanks!

0 Likes

#2

When I follow those steps, I get the result you want (the doc comment is commented out as well).

Off the top of my head the things that come to mind are the Syntax you’re using is third party or an older version that scopes things differently, or a plugin has gone somewhat awry.

Are you using the Python syntax that ships with Sublime (and if so, what build?) or something third party? In the latter case, does using the default syntax perform differently?

1 Like

#3

Apologies for the late reply. I eventually got round to bug fixing this and the culprit was the package Python Improved, which is a syntax highlighter extension, as you predicted.

Thanks!

1 Like