How to split a code cell in Google Colab?

Viewed 10283

Using Jupyter Notebook I found that the function to split cells is very useful. I would like to do that in Google Colab as well, but I can't find how to do it.

Can it be done? And if the answer is yes, how?

2 Answers

I don't know how to do it via menu selections, but in Jupyter Lab the shortcut is "Ctrl+Shift+-" to split a cell. Google Colab's shortcuts often replace "Ctrl+Shift+…" with "⌘/Ctrl+M …".

So, in this case, it would probably be "⌘/Ctrl+M -".

The "Keyboard shortcuts" window confirms this.

If you go to:

google colab page menu -> Tools -> Keyboard shortcuts -> Split at Cursor

you can find it.

The default is Ctrl + M -, But you can modify it to whatever shortcut you prefer.

Related