How to reset all comments in pycharm

I recently edited files with a lot of long comments. I find that I add a lot of them manually, is there a way to reset all this at once using some kind of menu input or keyboard shortcut?

+5
source share
2 answers

Since writing (version 2016.2.3) there is no way to collapse only comments.

The closest is the menu item Code > Folding > Expand all to level , but this resets everything by level. 5 levels are available, with keyboard shortcuts:

  • Ctrl + Shift + Numpad * , 1 (Press Ctrl + Shift + Numpad *, then press 1. At the macOS command prompt for Ctrl)

    enter image description here

  • Ctrl + Shift + Numpad * , 2

    enter image description here

  • Ctrl + Shift + Numpad * , 3

    enter image description here

  • Ctrl + Shift + Numpad * , 4

    enter image description here

  • Ctrl + Shift + Numpad * , 5

    enter image description here

+5
source

Press (Command) and + (key) to expand and use - (key) to collapse

-1
source

Source: https://habr.com/ru/post/1242983/


All Articles