Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide/unhide comments with Microsoft VSCode?

I have a code with many comments, how can I hide these ones, but no delete, I need them after.

I need to hide all the comments in one click, not a simple collapse one

like image 721
Olek Avatar asked May 16 '19 17:05

Olek


People also ask

How do I hide comments in Visual Studio code?

Menu editor title actionsOn the editor title, a toggle action is available to show/hide the comments quickly. Note: In case you are using the hideComments. regex setting to hide additional lines with custom regex, you will have a second toggle action available.

How do I unblock comments in Visual Studio?

Comment Code Block Ctrl+K+C/Ctrl+K+U Ctrl+K+U will uncomment the code.

How do I unhide VS code bar status?

Search for “status bar” and check/uncheck the checkbox in the “Workbench > Status Bar: Visible” section to show/hide the status bar, respectively.


2 Answers

Can't find such feature as well. Read this issue from GitHub - https://github.com/Microsoft/vscode/issues/46505

Seems like that VSCode can't do it (from the box) and all people waiting for that feature.

like image 153
IFier Avatar answered Oct 11 '22 18:10

IFier


I was looking for a way to do that too as I put way too many comments making it hard to debug... and I came across this https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hide-comments it makes all the comments invisible, but it leaves special characters in place. There are also commands to toggle show/hide.

like image 32
Anthony Kung Avatar answered Oct 11 '22 18:10

Anthony Kung