spacemacs/contrib/lang/ess/README.md
Jean-Christophe Petkovich eb964ed311 Add ESS noweb (knitr/sweave) keybindings
There are a number of functions included in ESS for dealing with knitr
and sweave "chunks" that are quite handy.

These are the bindings I use, which I humbly recommend for inclusion as
defaults.

The only potential problem that I see with their inclusion is that they
only really make sense in ess-noweb-mode (a minor mode) buffers, but
since evil-leader doesn't seem to like layering keybindings through
minor-modes, adding them to ess-mode is the best solution that I can
come up with for now.

Fix ess chunk bindings as per suggestions
2015-01-30 22:11:12 -05:00

68 lines
2.6 KiB
Markdown

# R (ESS) contribution layer for Spacemacs
![logo](img/r.jpg)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [R (ESS) contribution layer for Spacemacs](#r-ess-contribution-layer-for-spacemacs)
- [Install](#install)
- [Key Bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Other R commands](#other-r-commands)
<!-- markdown-toc end -->
## Install
To use this contribution add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(ess)
"List of contribution to load."
)
```
## Key Bindings
**Important**:
In order to speed up the boot time of `Spacemacs`, `ESS` must be loaded
manually via the key binding:
<SPC> e s s
### Inferior REPL process
Start an `R` inferior REPL process with <kbd>SPC m i</kbd>.
Send code to inferior process commands:
Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC m b</kbd> | send buffer and keep code buffer focused
<kbd>SPC m B</kbd> | send buffer and switch to REPL in insert mode
<kbd>SPC m c c</kbd> | send knitr/sweave chunk and keep buffer focused
<kbd>SPC m c C</kbd> | send knitr/sweave chunk and switch to REPL in insert mode
<kbd>SPC m c d</kbd> | send knitr/sweave chunk and step to next chunk
<kbd>SPC m c m</kbd> | mark knitr/sweave chunk around point
<kbd>SPC m c n</kbd> | next knitr/sweave chunk
<kbd>SPC m c N</kbd> | previous knitr/sweave chunk
<kbd>SPC m d</kbd> | send region or line and step (debug)
<kbd>SPC m D</kbd> | send function or paragraph and step (debug)
<kbd>SPC m l</kbd> | send line and keep code buffer focused
<kbd>SPC m L</kbd> | send line and switch to REPL in insert mode
<kbd>SPC m r</kbd> | send region and keep code buffer focused
<kbd>SPC m R</kbd> | send region and switch to REPL in insert mode
<kbd>SPC m t</kbd> | send thing at point (function) and keep code buffer focused
<kbd>SPC m T</kbd> | send thing at point (function) and switch to REPL in insert mode
<kbd>CTRL+j</kbd> | next item in REPL history
<kbd>CTRL+k</kbd> | previous item in REPL history
### Other R commands
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>SPC m p</kbd> | object introspection popup [ess-R-object-popup][ess-R-object-popup]
<kbd>SPC m v p</kbd> | view data under point using [ess-R-data-view][ess-R-data-view]
<kbd>SPC m v t</kbd> | view table using [ess-R-data-view][ess-R-data-view]