개발하자

How to split cell in VSCode Jupyter Notebook?

Cuire 2023. 8. 14. 04:33
반응형

How to split cell in VSCode Jupyter Notebook?

How can a Jupyter notebook cell be split in VSCode? I.e., how to split a single cell with multiple lines into two cells with the top lines (above the cursor) in one cell and the bottom lines (below the cursor) in another cell?

I've tried Cntrl Shift - using the Daily Insiders Python Extension, but it doesn't seem to do anything.




The trick is to just put the cursor where you want to split and then use ctrl-shift dash. If you try to highlight the section you want split out, as in normal Jupyter splitting, you will get the zoom behavior.




The Ctrl Shift - is for zooming out the display by default in VS Code. This feature has been put for a long time in Github, and the following is the request:

Jupyter Split Cell and Select Multiple Cells command

This issue is still open, although there's Notebooks are getting revamped! existed, it's for VS Code Insiders, not our current using VS Code. Maybe the production group can improve it in the future.




In VSCode version 1.57.0-insider you can:

  • split cells with the hotkey: Ctrl+Shift+-

See also: Merge cells in VSCode jupyter notebook?




ctrl shift - works for VSCode (version 1.66.2) on Mac (Monterey 12.3.1)


반응형