Ctrl + Z should undo the cell changes first (Or should not undo the outputs)
See original GitHub issueEnvironment data
- VS Code version: 1.55.2
- Jupyter Extension version (available under the Extensions sidebar): v2021.5.745244803
- Python Extension version (available under the Extensions sidebar): v2021.4.765268190
- OS (Windows | Mac | Linux distro) and version: Windows 10
- Python and/or Anaconda version: N/A
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local | Remote | N/A
Expected behaviour
Ctrl + Z
should undo changes in the cell if cell has been focused. And I’m also not sure should Ctrl+Z
can undo the outputs? (IMO: Not)
Actual behaviour
Outputs will be undone rather than the cell.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
-
Prepare a simple notebook:
-
Run the cell and type something in the cell before cell runs done:
-
Click the cell to make sure the cell has been focused:
-
Ctrl + Z
, Outputs disappeared. -
Ctrl + Z
, Code undo.
Logs
Not important
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Jupyter lab: ctrl + z shortcut only for selected cell rather than ...
I'm adding a picture to illustrate how to disable document-wide undo/redo here. JupyterLab -> Settings -> Advanced Settings Editor -> Notebook ...
Read more >Jupyter Notebook - Editing - Tutorialspoint
Ctrl-[. dedent. Ctrl-Down. go to cell end ; Ctrl-A. select all. Ctrl-Left. go one word left ; Ctrl-Z. undo. Ctrl-Right. go one word...
Read more >10 tricks for a better Google Colab experience
1. SAVE TIME WITH KEYBOARD SHORTCUTS ; Undo last action (inside a cell): ctrl + m + z ; Find and replace: ctrl...
Read more >JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
The undo/redo history in the notebook is now document-wide (tracking changes across all cells); the future verisions will enable restoring the previous ...
Read more >Working with Jupyter Notebooks in Visual Studio Code
You can use the z key to undo your previous change, for example, if you've made an accidental edit, you can undo it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t believe there is a current workaround on this. We can discuss at our triage meeting (Thursday) about what we’d expect Ctrl-Z to do in this situation. If we have agreement from our team on this change I could help point you are the code area for making this fix. Our focus is really heavily on the new UI currently, so we’d be unlikely to fix it ourselves.
Thanks to the team!