2016-01-06 05:21:55 +00:00
|
|
|
#+TITLE: ESS (R) layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
[[file:img/r.jpg]]
|
|
|
|
|
2016-03-31 02:59:55 +00:00
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#key-bindings][Key Bindings]]
|
|
|
|
- [[#inferior-repl-process][Inferior REPL process]]
|
|
|
|
- [[#helpers][Helpers]]
|
|
|
|
- [[#options][Options]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =ess= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Key Bindings
|
|
|
|
** Inferior REPL process
|
2015-10-14 14:52:26 +00:00
|
|
|
Send code to inferior process with these commands:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
| Key Binding | Description |
|
|
|
|
|-------------+------------------------------------------------------------------|
|
|
|
|
| ~SPC m c c~ | send knitr/sweave chunk and keep buffer focused |
|
|
|
|
| ~SPC m c C~ | send knitr/sweave chunk and switch to REPL in insert mode |
|
|
|
|
| ~SPC m c d~ | send knitr/sweave chunk and step to next chunk |
|
|
|
|
| ~SPC m c m~ | mark knitr/sweave chunk around point |
|
|
|
|
| ~SPC m c n~ | next knitr/sweave chunk |
|
|
|
|
| ~SPC m c N~ | previous knitr/sweave chunk |
|
|
|
|
| ~SPC m s b~ | send buffer and keep code buffer focused |
|
|
|
|
| ~SPC m s B~ | send buffer and switch to REPL in insert mode |
|
|
|
|
| ~SPC m s d~ | send region or line and step (debug) |
|
|
|
|
| ~SPC m s D~ | send function or paragraph and step (debug) |
|
|
|
|
| ~SPC m s i~ | start an inferior REPL process |
|
|
|
|
| ~SPC m s l~ | send line and keep code buffer focused |
|
|
|
|
| ~SPC m s L~ | send line and switch to REPL in insert mode |
|
|
|
|
| ~SPC m s r~ | send region and keep code buffer focused |
|
|
|
|
| ~SPC m s R~ | send region and switch to REPL in insert mode |
|
2017-01-22 17:24:43 +00:00
|
|
|
| ~SPC m s f~ | send thing at point (function) and keep code buffer focused |
|
|
|
|
| ~SPC m s F~ | send thing at point (function) and switch to REPL in insert mode |
|
2015-06-10 16:44:30 +00:00
|
|
|
| ~CTRL+j~ | next item in REPL history |
|
|
|
|
| ~CTRL+k~ | previous item in REPL history |
|
|
|
|
|
|
|
|
** Helpers
|
2015-10-14 14:52:26 +00:00
|
|
|
Helpers for inspecting objects at point are available in R buffers only.
|
2016-04-13 03:31:38 +00:00
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
| Key Binding | Description |
|
|
|
|
|-------------+---------------------------------------------------------------------|
|
|
|
|
| ~SPC m h d~ | view data under point using [ess-R-data-view][ess-R-data-view] |
|
|
|
|
| ~SPC m h i~ | object introspection popup [ess-R-object-popup][ess-R-object-popup] |
|
|
|
|
| ~SPC m h t~ | view table using [ess-R-data-view][ess-R-data-view] |
|
|
|
|
|
|
|
|
* Options
|
2017-06-16 07:51:24 +00:00
|
|
|
To turn off the automatic replacement of underscores by =<-=, set in your
|
|
|
|
=~/.spacemacs=:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '((ess :variables
|
2017-05-02 14:18:23 +00:00
|
|
|
ess-disable-underscore-assign t)))
|
2015-06-10 16:44:30 +00:00
|
|
|
#+END_SRC
|
2015-10-02 17:41:10 +00:00
|
|
|
|
2017-06-16 07:51:24 +00:00
|
|
|
Alternatively you may enable =ess-smart-equals=, which also disables replacement
|
|
|
|
of underscores by =<-=, and additionally replace the equals sign with =<-= when
|
|
|
|
appropriate:
|
2015-10-02 17:41:10 +00:00
|
|
|
|
2017-05-02 14:18:23 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '((ess :variables
|
|
|
|
ess-enable-smart-equals t)))
|
|
|
|
#+END_SRC
|