vscode-jupyter
vscode-jupyter copied to clipboard
Python interactive window delete last cell output shortcut/button
When you run a python cell using the interactive window, you encounter the common situation where there is an error. The error messaging of python can be really long and if you're trying to run different approaches of your code, this may lead to multiple super long cell outputs in your interactive window. To clean this up without removing your previous good outputs, it requires quite some scrolling and clicking.
This could be mitigated by either adding a shortcut which deletes the last cell or by adding the option to a output cell to delete the cell above.
a very cheap drawing of what i mean:

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!
The Jupyter extension could add this.
you can now select an IW history cell in insiders and use DD or delete to remove the cell, which should improve this workflow
Does it remove the code and output together as a unit?
yes, both input and output of the cell are removed (the action can also be undone if focus is in the history view)
Was this removed after the most recent release? After updating my VSCode install just now I seem to not be able to delete cells:

Install versions:

@zatkins2 - yes that looks like a regression, made a new issue here https://github.com/microsoft/vscode/issues/168493
You can still click on the cell and press the delete key as a workaround until we get a fix out
Thanks. Unfortunately the delete-key trick doesn't work for me (also unfortunately I didn't know that trick in the past, so I can't say if that behavior is also a regression)
Unfortunately the delete-key trick doesn't work for me
That's strange - can you check your keyboard shortcuts for notebook.cell.delete? There should be an entry from both core and the Extension. Also make sure you don't have focus in the cell input.

Ah sorry! The focus on the cell input was the issue, it works :)