spacemacs/layers/+lang/ipython-notebook/README.org

152 lines
6.1 KiB
Org Mode
Raw Normal View History

#+TITLE: IPython Notebook contribution layer for Spacemacs (WIP)
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
2015-06-10 16:44:30 +00:00
* Table of Contents :TOC_4_org:noexport:
- [[Description][Description]]
- [[Features][Features]]
- [[List of TODOS][List of TODOS]]
- [[Maybe it'd be better if there was a state for this][Maybe it'd be better if there was a state for this]]
- [[Make more keybinding to =connect= to a python buffer.][Make more keybinding to =connect= to a python buffer.]]
- [[Deleting visual regions don't work, find out why.][Deleting visual regions don't work, find out why.]]
- [[Install][Install]]
- [[Layer][Layer]]
- [[Dependencies][Dependencies]]
- [[What needs to be run][What needs to be run]]
- [[Using the IPython notebook][Using the IPython notebook]]
- [[Open Notebook List][Open Notebook List]]
- [[Key Bindings][Key Bindings]]
- [[Micro-state: =ipython-notebook=][Micro-state: =ipython-notebook=]]
- [[Normal mode][Normal mode]]
- [[Insert mode][Insert mode]]
- [[Traceback mode][Traceback mode]]
- [[Screenshots][Screenshots]]
- [[Light][Light]]
- [[Dark][Dark]]
- [[Bonus][Bonus]]
2015-06-10 16:44:30 +00:00
2015-07-27 19:50:52 +00:00
* Description
This layer adds support for the package =emacs-ipython-notebook=.
Do not hesitate to check the original package README [[https://github.com/millejoh/emacs-ipython-notebook][here]]. Also the wiki has
lots of informative stuff.
2015-06-10 16:44:30 +00:00
* Features
- Keybindings available through micro-State or leader key
- Lazy-loading
* List of TODOS
This is a WIP, feel free to collaborate.
** TODO Maybe it'd be better if there was a state for this
** TODO Make more keybinding to =connect= to a python buffer.
** TODO Deleting visual regions don't work, find out why.
2015-06-10 16:44:30 +00:00
* Install
** Layer
#+begin_src emacs-lisp
(setq-default dotspacemacs-configuration-layers '(ipython-notebook))
#+end_src
2015-06-10 16:44:30 +00:00
** Dependencies
Install IPython > 3
#+begin_src sh
pip install ipython
#+end_src
2015-06-10 16:44:30 +00:00
** What needs to be run
Have an IPython notebook running
#+begin_src sh
ipython notebook
#+end_src
2015-06-10 16:44:30 +00:00
* 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~
2015-06-10 16:44:30 +00:00
** Key Bindings
The key bindings can be used through a micro state or the usual evil-leader.
2015-07-27 19:50:52 +00:00
*** 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.
| Key | Function |
|---------+-------------------------------------------|
2015-06-10 16:44:30 +00:00
| ~h~ | ein:notebook-worksheet-open-prev-or-last |
| ~j~ | ein:worksheet-goto-next-input |
| ~k~ | ein:worksheet-goto-prev-input |
| ~l~ | ein:notebook-worksheet-open-next-or-first |
| ~H~ | ein:notebook-worksheet-move-prev |
| ~J~ | ein:worksheet-move-cell-down |
| ~K~ | ein:worksheet-move-cell-up |
| ~L~ | ein:notebook-worksheet-move-next |
| ~t~ | ein:worksheet-toggle-output |
| ~d~ | ein:worksheet-kill-cell |
| ~R~ | ein:worksheet-rename-sheet |
| ~y~ | ein:worksheet-copy-cell |
| ~p~ | ein:worksheet-yank-cell |
2015-08-17 18:25:48 +00:00
| ~i~ | ein:worksheet-insert-cell-below |
| ~I~ | ein:worksheet-insert-cell-above |
2015-06-10 16:44:30 +00:00
| ~u~ | ein:worksheet-change-cell-type |
| ~RET~ | ein:worksheet-execute-cell-and-goto-next |
| ~C-l~ | ein:worksheet-clear-output |
| ~C-S-l~ | ein:worksheet-clear-all-output |
| ~C-o~ | ein:console-open |
| ~C-k~ | ein:worksheet-merge-cell |
| ~C-j~ | spacemacs/ein:worksheet-merge-cell-next |
| ~C-s~ | ein:notebook-save-notebook-command |
| ~C-r~ | ein:notebook-rename-command |
| ~1~ | ein:notebook-worksheet-open-1th |
| ~2~ | ein:notebook-worksheet-open-2th |
| ~3~ | ein:notebook-worksheet-open-3th |
| ~4~ | ein:notebook-worksheet-open-4th |
| ~5~ | ein:notebook-worksheet-open-5th |
| ~6~ | ein:notebook-worksheet-open-6th |
| ~7~ | ein:notebook-worksheet-open-7th |
| ~8~ | ein:notebook-worksheet-open-8th |
| ~9~ | ein:notebook-worksheet-open-last |
| ~+~ | ein:notebook-worksheet-insert-next |
| ~-~ | ein:notebook-worksheet-delete |
| ~x~ | ein:notebook-close |
*** Normal mode
In normal mode the following key bindings are defined:
| Key | Function |
|---------+------------------------------------------|
| ~gj~ | ein:worksheet-goto-next-input |
| ~gk~ | ein:worksheet-goto-prev-input |
| ~C-RET~ | ein:worksheet-execute-cell |
| ~S-RET~ | ein:worksheet-execute-cell-and-goto-next |
2015-06-16 02:56:55 +00:00
Also ~SPC f s~ saves the notebook like you would a regular buffer.
*** Insert mode
In normal mode the following key bindings are defined:
| Key | Function |
|---------+------------------------------------------|
| ~C-RET~ | ein:worksheet-execute-cell |
| ~S-RET~ | ein:worksheet-execute-cell-and-goto-next |
2015-07-27 19:50:52 +00:00
*** Traceback mode
In traceback mode the following key bindings are defined:
| key | Function |
|-------+----------------------------------------|
| ~RET~ | ein:tb-jump-to-source-at-point-command |
| ~n~ | ein:tb-next-item |
| ~p~ | ein:tb-prev-item |
| ~q~ | bury-buffer |
2015-06-10 16:44:30 +00:00
* Screenshots
** Light
[[file:img/light.png]]
** Dark
[[file:img/dark.png]]
2015-06-10 16:44:30 +00:00
* Bonus
If you want to have a matplotlibrc that looks good with a dark background try
using [[file:matplotlibrc][this]] =matplotlibrc=. Plot background is always transparent by default so
it will look okay for most dark themes out there.