Skip to content

Latest commit

 

History

History
151 lines (132 loc) · 6.14 KB

README.org

File metadata and controls

151 lines (132 loc) · 6.14 KB

IPython Notebook layer

Table of Contents

Description

This layer adds support for the package emacs-ipython-notebook.

Do not hesitate to check the original package README here. Also the wiki has lots of informative stuff.

Features

  • Keybindings available through micro-State or leader key
  • Lazy-loading

List of TODOS

This is a WIP, feel free to collaborate.

Maybe it’d be better if there was a state for this

Make more keybinding to connect to a python buffer.

Deleting visual regions don’t work, find out why.

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add ipython-noteboolk to the existing dotspacemacs-configuration-layers list in this file.

Dependencies

Install IPython > 3

pip install ipython

What needs to be run

Have an IPython notebook running

ipython notebook

Using the IPython notebook

Open Notebook List

This layer is lazy loaded so the micro-state will only work after you summon the command ein:notebooklist-open which is bound to SPC a i n

Key Bindings

The key bindings can be used through a micro state or the usual evil-leader.

Micro-state: ipython-notebook

Once you are in the ipython notebook you can activate the micro-state with SPC e i n

The following table lists the keys. Use them as listed in the micro-state or prefix with SPC m to use with your evil-leader.

KeyFunction
hein:notebook-worksheet-open-prev-or-last
jein:worksheet-goto-next-input
kein:worksheet-goto-prev-input
lein:notebook-worksheet-open-next-or-first
Hein:notebook-worksheet-move-prev
Jein:worksheet-move-cell-down
Kein:worksheet-move-cell-up
Lein:notebook-worksheet-move-next
tein:worksheet-toggle-output
dein:worksheet-kill-cell
Rein:worksheet-rename-sheet
yein:worksheet-copy-cell
pein:worksheet-yank-cell
iein:worksheet-insert-cell-below
Iein:worksheet-insert-cell-above
uein:worksheet-change-cell-type
RETein:worksheet-execute-cell-and-goto-next
C-lein:worksheet-clear-output
C-S-lein:worksheet-clear-all-output
C-oein:console-open
C-kein:worksheet-merge-cell
C-jspacemacs/ein:worksheet-merge-cell-next
C-sein:notebook-save-notebook-command
C-rein:notebook-rename-command
1ein:notebook-worksheet-open-1th
2ein:notebook-worksheet-open-2th
3ein:notebook-worksheet-open-3th
4ein:notebook-worksheet-open-4th
5ein:notebook-worksheet-open-5th
6ein:notebook-worksheet-open-6th
7ein:notebook-worksheet-open-7th
8ein:notebook-worksheet-open-8th
9ein:notebook-worksheet-open-last
+ein:notebook-worksheet-insert-next
-ein:notebook-worksheet-delete
xein:notebook-close

Normal mode

In normal mode the following key bindings are defined:

KeyFunction
gjein:worksheet-goto-next-input
gkein:worksheet-goto-prev-input
C-RETein:worksheet-execute-cell
S-RETein:worksheet-execute-cell-and-goto-next

Also SPC f s saves the notebook like you would a regular buffer.

Insert mode

In normal mode the following key bindings are defined:

KeyFunction
C-RETein:worksheet-execute-cell
S-RETein:worksheet-execute-cell-and-goto-next

Traceback mode

In traceback mode the following key bindings are defined:

keyFunction
RETein:tb-jump-to-source-at-point-command
nein:tb-next-item
pein:tb-prev-item
qbury-buffer

Screenshots

Light

img/light.png

Dark

img/dark.png

Bonus

If you want to have a matplotlibrc that looks good with a dark background try using this matplotlibrc. Plot background is always transparent by default so it will look okay for most dark themes out there.