Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shortcuts for editing code indentation in jupyter notebook

Are there any shortcuts for code indentation editing in a jupyter notebook like available in VScode, sublime, etc? Specifically, I need help for shifting back a selected piece of code by one tab space.

like image 338
Legolas Avatar asked Jul 08 '19 07:07

Legolas


2 Answers

Ctrl-] : indent
Ctrl-[ : shifting back indentation

if it doesn't work, then try:

Tab : indent
Shift + Tab : shfting back indentation
like image 64
one Avatar answered Sep 27 '22 20:09

one


You can select the code block using Ctrl + A and then use

Ctrl + ] indent
Ctrl + [ dedent

For complete list of Jupyter notebook key shortcuts visit here

like image 20
GOVIND DIXIT Avatar answered Sep 27 '22 21:09

GOVIND DIXIT