Pycharm comment shortcut keys are: 1. For single-line comments, use "#"; 2. For multi-line comments, use three quotation marks """; 3. For batch comments, select the text line to be commented, and after the background changes , press "Ctrl /" at the same time; 4. Cancel batch comment, select the commented text line, after the background changes, press "Ctrl /" at the same time; 5. Batch indent, select the text lines to be indented, after the background changes, Press the "TAB" key; 6. Cancel batch indentation, select the text lines to be indented, and after the background changes, press the "SHIFT TAB" key.
The operating system of this tutorial: Windows 10 system, Dell G3 computer.
PyCharm comment shortcut keys include:
Single line comments: use
#Multi-line comments: Use three quotes """
Batch comments: Select the text lines to be commented. After the background changes, press Ctrl /
## at the same timePyCharm’s uncomment shortcut key
PyCharm’s default uncomment shortcut key is Ctrl Slash(/) (Windows and Linux) or Command Slash(/) ( macOS). If you need to modify the shortcut keys, you can set them in PyCharm's Settings. File -> Settings -> Keymap -> Editor Actions -> Comment with Line Comment. Search for Comment with Line Comment in the Keymap, right-click and select Add Keyboard Shortcut, and then press the shortcut key you want to set. If you need to cancel the shortcut key that has been set, you can search for Comment with Line Comment in the Keymap, right-click and select Remove Keyboard Shortcut, and then press the Esc key to cancel the shortcut key setting.The above is the detailed content of What are the shortcut keys for pycharm comments?. For more information, please follow other related articles on the PHP Chinese website!