0% found this document useful (0 votes)
47 views

Python Short Cut Keys

The document lists keyboard shortcuts for Jupyter Notebook's command and edit modes. In command mode, shortcuts are provided to find and replace text, open the command palette, change cell types, select cells, insert and delete cells, save notebooks, and more. In edit mode, shortcuts include code completion, indentation, search/selection, undo/redo, and toggling between command mode. Magic commands are also shown for executing code in different languages.

Uploaded by

Hemanth Appu K S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Python Short Cut Keys

The document lists keyboard shortcuts for Jupyter Notebook's command and edit modes. In command mode, shortcuts are provided to find and replace text, open the command palette, change cell types, select cells, insert and delete cells, save notebooks, and more. In edit mode, shortcuts include code completion, indentation, search/selection, undo/redo, and toggling between command mode. Magic commands are also shown for executing code in different languages.

Uploaded by

Hemanth Appu K S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Command Mode (press Esc to enable)Edit Shortcuts

F : find and replace

Ctrl-Shift-F : open the command palette

Ctrl-Shift-P : open the command palette

Enter : enter edit mode

P : open the command palette

Shift-Enter : run cell, select below

Ctrl-Enter : run selected cells

Alt-Enter : run cell, insert below

Y : to code

M : to markdown

R : to raw

1 : to heading 1

2 : to heading 2

3 : to heading 3

4 : to heading 4

5 : to heading 5

6 : to heading 6

K : select cell above

Up : select cell above

Down : select cell below

J : select cell below

Shift-K : extend selected cells above

Shift-Up : extend selected cells above

Shift-Down : extend selected cells below

Shift-J : extend selected cells below

A : insert cell above

B : insert cell below

X : cut selected cells

C : copy selected cells

Shift-V : paste cells above

V : paste cells below


Z : undo cell deletion

D , D : delete selected cells

Shift-M : merge selected cells, or current cell with cell below if only one cell selected

Ctrl-S : Save and Checkpoint

S : Save and Checkpoint

L : toggle line numbers

O : toggle output of selected cells

Shift-O : toggle output scrolling of selected cells

H : show keyboard shortcuts

I , I : interrupt kernel

0 , 0 : restart the kernel (with dialog)

Esc : close the pager

Q : close the pager

Shift-L : toggles line numbers in all cells, and persist the setting

Shift-Space : scroll notebook up

Space : scroll notebook down


Edit Mode (press Enter to enable)
Tab : code completion or indent

Shift-Tab : tooltip

Ctrl-] : indent

Ctrl-[ : dedent

Ctrl-A : select all

Ctrl-Z : undo

Ctrl-Shift-Z : redo

Ctrl-Y : redo

Ctrl-Home : go to cell start

Ctrl-Up : go to cell start

Ctrl-End : go to cell end

Ctrl-Down : go to cell end

Ctrl-Left : go one word left

Ctrl-Right : go one word right

Ctrl-Backspace : delete word before


Ctrl-Delete : delete word after

Ctrl-M : command mode

Ctrl-Shift-F : open the command palette

Ctrl-Shift-P : open the command palette

Esc : command mode

Shift-Enter : run cell, select below

Ctrl-Enter : run selected cells

Alt-Enter : run cell, insert below

Ctrl-Shift-Minus : split cell

Ctrl-S : Save and Checkpoint

Down : move cursor down

Up : move cursor up
Magic Command

Available line magics:


%alias %alias_magic %autocall %automagic %autosave %bookmark %cd %clear %cl
s %colors %config %connect_info %copy %ddir %debug %dhist %dirs %doctest_m
ode %echo %ed %edit %env %gui %hist %history %killbgscripts %ldir %less
%load %load_ext %loadpy %logoff %logon %logstart %logstate %logstop %ls %l
smagic %macro %magic %matplotlib %mkdir %more %notebook %page %pastebin %p
db %pdef %pdoc %pfile %pinfo %pinfo2 %popd %pprint %precision %profile %p
run %psearch %psource %pushd %pwd %pycat %pylab %qtconsole %quickref %reca
ll %rehashx %reload_ext %ren %rep %rerun %reset %reset_selective %rmdir %r
un %save %sc %set_env %store %sx %system %tb %time %timeit %unalias %unl
oad_ext %who %who_ls %whos %xdel %xmode

Available cell magics:


%%! %%HTML %%SVG %%bash %%capture %%cmd %%debug %%file %%html %%javascript
%%js %%latex %%perl %%prun %%pypy %%python %%python2 %%python3 %%ruby %%sc
ript %%sh %%svg %%sx %%system %%time %%timeit %%writefile

Automagic is ON, % prefix IS NOT needed for line magics.

You might also like