Home > Net >  Python VSC - Empty Cell
Python VSC - Empty Cell

Time:07-16

This might be a basic question, but I'm on an M1 Mac, using Visual Studio Code. Many times before I have pressed cmd-z to undo and it opens an empty cell. I cannot work out how to get back to my code and at prior times if it wasn't saved I've started again. I've turned this feature off in the settings but yet it persists. Can you please help me get back to my normal code and close this cell?

See image below.

Empty cell:
enter image description here

CodePudding user response:

I'm hoping I can be some help. Jupyter Lab has two modes. There's the command mode which is used for creating/deleting cells and then there's the edit mode which is used to actually input stuff into the cell. If you deleted a cell in command mode and pressed CTRL Z, the action will be undone and the cell will reappear. You need to be in edit mode in your desired selected cell to be able to undo any action in that cell. I hope this helps and I understood your question correctly.

CodePudding user response:

This should be related to your shortcut key bindings.

You can follow the steps below to see what function is bound to your Ctrl Z shortcut.

  1. Click the gear icon in the lower left corner of the interface

  2. Select Keyboard Shortcuts (Ctrl K S)

    enter image description here

  3. Select Record Keys (Alt k) on the right side of the input box

    enter image description here

  4. Press the CTRL and Z keys

  5. View the functions bound to this shortcut key in the list

    enter image description here

  6. If there are bindings other than Undo, delete them

  • Related