Normally in version 2.7 I could add comments in python by pressing ctrl+slash.
Result:
# class A(object):
# def blah(self):
# pass
After installation of PyCharm 3.0.
#class A(object):
# def blah(self):
# pass
I was searching in Setings > Project Setting > Code Style > Python
and could not find anything.
Also I checked Settings > Keymap
But seems to it is impossible to edit anything there.
I tried also change keymap from Eclipse to different options but didn't help.
Annotation about right use of # with space. PEP8
How to do it?
To Quote he documentation:
Block comments generally apply to some (or all) code that follows them, and are indented to the same level as that code. Each line of a block comment starts with a # and a single space (unless it is indented text inside the comment).
What you are perhaps referring to are inline comments, and I would totally agree with you.
In your case, it is indented, so its best to keep them the way they are. However, if you want to add a space after each comment #
without too much hassle, you can do the following:
I got the cursor to be selected in the video by holding down the ALT key and dragging with out mouse. I would not usually add an animated gif, but I have done so for clarity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With