This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/!lang/ess
Jean-Christophe Petkovich 793134aab0 ESS company sources should be grouped
The ess company sources should be grouped, when they are not grouped
they are pretty buggy (like not showing completions under certain
circumstances).

To see the problem, try opening an R file and start the interpreter.

When you type the following ([] is the cursor):

    setN[]

You will see completions offering up `setNames`. Press `<enter>`.

Now, try doing the following:

    setNames(setN[])

You will see no completions. Company is trying the `company-R-args`
source, failing it, then skipping the execution of the
`company-R-objects` source.

Grouping them together fixes this, and is what's done within ess itself.
2015-08-01 00:25:00 -04:00
..
img
config.el change ess-anable-smart-equals default to nil 2015-07-29 22:11:38 -04:00
packages.el ESS company sources should be grouped 2015-08-01 00:25:00 -04:00
README.org change ess-anable-smart-equals default to nil 2015-07-29 22:11:38 -04:00

R (ESS) contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/793134aab0e19f5bb0a7e4075fd8a27e4f9f85e2/contrib/!lang/ess/img/r.jpg

Install

To use this contribution add it to your ~/.spacemacs

(setq-default dotspacemacs-configuration-layers '(ess))

Important: In order to speed up the boot time of Spacemacs, ESS must be loaded manually via the key binding: SPC e s s

Key Bindings

Inferior REPL process

Start an R inferior REPL process with SPC m s i.

Send code to inferior process commands:

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
SPC m s t send thing at point (function) and keep code buffer focused
SPC m s T send thing at point (function) and switch to REPL in insert mode
CTRL+j next item in REPL history
CTRL+k previous item in REPL history

Helpers

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

ess-smart-equals is disabled by default. In order to enable it, set in your ~/.spacemacs

  (setq-default dotspacemacs-configuration-layers '((ess :variables
                                                         ess-enable-smart-equals t)))