Home > Mobile >  How to comment a line in Pycharm?
How to comment a line in Pycharm?

Time:02-05

What is the keyboard shortcut to comment text in Pycharm?

When I use ctrl /, I get:

pycharm screenshot

CodePudding user response:

  1. Go to your PyCharm settings (ctrl alt s) and locate the Keymap on the left sidebar.

  2. Look up comment using the search bar on the top right, and look at the shortcut for Comment with Line Comment.

  3. Change it to whatever you'd like, and see if it works.

Ref.

CodePudding user response:

line comment is

//comment here

multiple line comment is

/* comment
   here
*/

CodePudding user response:

It is collapsing and expanding code block. Try // for single-line comments Or /* For multiple line comments */

  •  Tags:  
  • Related