Skip to content

Instantly share code, notes, and snippets.

@rpietro
Created June 26, 2014 17:44
Show Gist options
  • Save rpietro/dd0e087d455cb435f252 to your computer and use it in GitHub Desktop.
Save rpietro/dd0e087d455cb435f252 to your computer and use it in GitHub Desktop.
shortcuts for ipython notebook

Shortcuts for iPython notebook

Command Mode (press Esc to enable)

Enter: edit mode
Shift-Enter: run cell, select below
Ctrl-Enter: run cell
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
Up: select previous cell
Down: select next CELL
k: select previous cell
j: select next cell
Ctrl-k: move cell up
Ctrl-j: move cell down
a: insert cell above
b: insert cell below
x: cut cell
c: copy cell
Shift-v: paste cell above
v: paste cell below
z: undo last delete
d: delete cell (press twice)
Shift-m: merge cell below
s: save notebook
Cmd-s: save notebook
l: toggle line numbers
o: toggle output
Shift-o: toggle output scrolling
q: close pager
h: keyboard shortcuts
i: interrupt kernel (press twice)
0: restart kernel (press twice)

Edit Mode (press Enter to enable)

Esc: command mode
Ctrl-m: command mode
Shift-Enter: run cell, select below
Ctrl-Enter: run cell
Alt-Enter: run cell, insert below
Ctrl-Shift--: split cell
Cmd-s: save notebook
Cmd-y: redo
Cmd-Up: go to cell start
Cmd-Down: go to cell end
Opt-Left: go one word left
Opt-Right: go one word right
Opt-Backspace: del word before
Opt-Delete: del word

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment