You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow commenting out/uncommenting multiple cells all at once #142437
In Jupyter notebook experience the users often need to turn different cells on or off (e.g. import, read/write files, different versions of the same function in debugging, etc). Currently you can manually skip cells or commenting out/uncommenting lines in a cell on a cell by cell basis, but it becomes inefficient when you need to do this for multiple cells. Alternatively you can temporarily change those cells to Markdown, but this is a messy workaround (especially when a code cell begins with #).
Desired experience
Select multiple cells
Press Ctrl + / to comment out all lines in selected code cells (add # to the beginning of each line. No action for Markdown cells if also selected)
Press Ctrl + / again to uncomment (remove # in the beginning of each line in selected code cells. If no # then do nothing to that line)
Frank Wang (@frank-yifei-wang) Thanks for the suggestion. I know that we have another suggestion or two about selections and editor operations spanning multiple cells, so we might be able to consider this at the same time.
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
I just switched from Jupyter Notebook to VSC, I have many commented cells on a older notebook ands it is very time consuming having to uncomment each line manually without this feature:
"Press Ctrl + / again to uncomment (remove # in the beginning of each line in selected code cells. If no # then do nothing to that line)"
Activity
IanMatthewHuff commentedon Feb 3, 2022
Frank Wang (@frank-yifei-wang) Thanks for the suggestion. I know that we have another suggestion or two about selections and editor operations spanning multiple cells, so we might be able to consider this at the same time.
vscode-triage-bot commentedon Feb 7, 2022
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
magrella commentedon Jan 11, 2023
What's the status of this please?
I just switched from Jupyter Notebook to VSC, I have many commented cells on a older notebook ands it is very time consuming having to uncomment each line manually without this feature:
"Press Ctrl + / again to uncomment (remove # in the beginning of each line in selected code cells. If no # then do nothing to that line)"
andrefilipefmsilva commentedon Jun 2, 2024
This would be a great feature. Struggling because of the lack of it right now.