Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a cell type in Google colab notebook using keyboard shortcuts

Are there any shortcuts to convert the current cell (where my cursor is) from one type to other (code cell -> Text Cell) or vice versa?

like image 568
Rishabh Sagar Avatar asked Jul 04 '18 09:07

Rishabh Sagar


People also ask

How do I convert a code cell to text in Google Colab?

Control + M M will convert a code cell to a text cell.

How do you make a cell markdown in Colab?

Colab has two types of cells: text and code. Text cells are formatted using a simple markup language called Markdown. To see the Markdown source, double-click a text cell, showing both the Markdown source and the rendered version. Above the Markdown source there is a toolbar to assist editing.

How do you run a cell in Colab?

There are two other keyboard shortcuts for running code: Alt-Enter runs the current cell and inserts a new one below. Ctrl-Enter run the current cell and enters command mode.


2 Answers

Control m m will convert a code cell to a text cell. Control m y will convert a text cell to a code cell.

The full list of keyboard shortcuts is available under 'Keyboard shortcuts' in the Tools menu.

like image 110
Bob Smith Avatar answered Sep 21 '22 11:09

Bob Smith


enter image description here

Please check the above image and follow it. For more shortcuts follow the tools>keyboard shortcuts in google colab

like image 21
Ravi Avatar answered Sep 24 '22 11:09

Ravi