2014-11-11 03:27:06 +00:00
|
|
|
# R (ESS) contribution layer for Spacemacs
|
|
|
|
|
2014-12-24 06:03:49 +00:00
|
|
|
![logo](img/r.jpg)
|
2014-12-10 05:00:09 +00:00
|
|
|
|
2014-12-12 01:00:33 +00:00
|
|
|
<!-- 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)
|
2015-01-31 03:18:30 +00:00
|
|
|
- [Helpers](#helpers)
|
2014-12-12 01:00:33 +00:00
|
|
|
|
|
|
|
<!-- markdown-toc end -->
|
|
|
|
|
2014-11-11 03:27:06 +00:00
|
|
|
## Install
|
|
|
|
|
|
|
|
To use this contribution add it to your `~/.spacemacs`
|
|
|
|
|
|
|
|
```elisp
|
2014-12-10 04:50:48 +00:00
|
|
|
(setq-default dotspacemacs-configuration-layers '(ess)
|
2014-11-11 03:27:06 +00:00
|
|
|
"List of contribution to load."
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
**Important**:
|
|
|
|
In order to speed up the boot time of `Spacemacs`, `ESS` must be loaded
|
2015-01-31 03:18:30 +00:00
|
|
|
manually via the key binding: <kbd>SPC e s s</kbd>
|
2014-11-11 03:27:06 +00:00
|
|
|
|
2015-01-31 03:18:30 +00:00
|
|
|
## Key Bindings
|
2014-11-11 03:27:06 +00:00
|
|
|
|
|
|
|
### Inferior REPL process
|
|
|
|
|
2014-12-12 01:00:33 +00:00
|
|
|
Start an `R` inferior REPL process with <kbd>SPC m i</kbd>.
|
2014-11-11 03:27:06 +00:00
|
|
|
|
|
|
|
Send code to inferior process commands:
|
|
|
|
|
2015-01-29 02:43:17 +00:00
|
|
|
Key Binding | Description
|
|
|
|
---------------------|------------------------------------------------------------
|
|
|
|
<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
|
2015-01-31 03:18:30 +00:00
|
|
|
<kbd>SPC m s b</kbd> | send buffer and keep code buffer focused
|
|
|
|
<kbd>SPC m s B</kbd> | send buffer and switch to REPL in insert mode
|
|
|
|
<kbd>SPC m s d</kbd> | send region or line and step (debug)
|
|
|
|
<kbd>SPC m s D</kbd> | send function or paragraph and step (debug)
|
|
|
|
<kbd>SPC m s l</kbd> | send line and keep code buffer focused
|
|
|
|
<kbd>SPC m s L</kbd> | send line and switch to REPL in insert mode
|
|
|
|
<kbd>SPC m s r</kbd> | send region and keep code buffer focused
|
|
|
|
<kbd>SPC m s R</kbd> | send region and switch to REPL in insert mode
|
|
|
|
<kbd>SPC m s t</kbd> | send thing at point (function) and keep code buffer focused
|
|
|
|
<kbd>SPC m s T</kbd> | send thing at point (function) and switch to REPL in insert mode
|
2015-01-29 02:43:17 +00:00
|
|
|
<kbd>CTRL+j</kbd> | next item in REPL history
|
|
|
|
<kbd>CTRL+k</kbd> | previous item in REPL history
|
2014-11-11 03:27:06 +00:00
|
|
|
|
2015-01-31 03:18:30 +00:00
|
|
|
### Helpers
|
2014-11-11 03:27:06 +00:00
|
|
|
|
2014-12-12 01:00:33 +00:00
|
|
|
Key Binding | Description
|
|
|
|
----------------------|------------------------------------------------------------
|
2015-01-31 03:18:30 +00:00
|
|
|
<kbd>SPC m h d</kbd> | view data under point using [ess-R-data-view][ess-R-data-view]
|
|
|
|
<kbd>SPC m h i</kbd> | object introspection popup [ess-R-object-popup][ess-R-object-popup]
|
|
|
|
<kbd>SPC m h t</kbd> | view table using [ess-R-data-view][ess-R-data-view]
|