Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow commenting out/uncommenting multiple cells all at once #142437

Closed
frank-yifei-wang opened this issue Feb 3, 2022 · 3 comments · Fixed by #221978
Closed

Allow commenting out/uncommenting multiple cells all at once #142437

frank-yifei-wang opened this issue Feb 3, 2022 · 3 comments · Fixed by #221978
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-multiselect on-testplan
Milestone

Comments

@frank-yifei-wang
Copy link

frank-yifei-wang commented Feb 3, 2022

Pain point

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

  1. Select multiple cells
  2. 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)
  3. Press Ctrl + / again to uncomment (remove # in the beginning of each line in selected code cells. If no # then do nothing to that line)

Thank you for considering this feature request.

@ghost ghost assigned IanMatthewHuff Feb 3, 2022
@IanMatthewHuff
Copy link
Member

@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.

@greazer greazer transferred this issue from microsoft/vscode-jupyter Feb 7, 2022
@greazer greazer added notebook-multiselect feature-request Request for new features or functionality labels Feb 7, 2022
@roblourens roblourens modified the milestones: Backlog Candidates, Backlog Feb 8, 2022
@magrella
Copy link

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)"

@rebornix rebornix assigned Yoyokrazy and unassigned roblourens and rebornix May 30, 2024
@andrefilipefmsilva
Copy link

This would be a great feature. Struggling because of the lack of it right now.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jul 18, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-multiselect on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants