Archived
1
0
Fork
You've already forked r-vterm.el
0
A simple vterm-based mode for an inferior R REPL process in Emacs.
This repository has been archived on 2026年02月09日. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Emacs Lisp 97.6%
  • Makefile 2.4%
2025年05月10日 10:19:32 +02:00
.gitignore update + clean-up 2025年03月16日 08:17:08 +01:00
Makefile uniformize name 2025年05月10日 08:43:51 +02:00
r-vterm.el repair support for radian for source 2025年05月10日 10:19:32 +02:00
README.org corr names 2025年05月10日 09:31:19 +02:00

r-vterm

r-vterm provides a major-mode for an inferior R process (or REPL) that runs in vterm, and a minor-mode that extends ess-r-mode with the ability to interact with the inferior R process.

It is a clone of the great julia-vterm with the necessay adjustment for R.

Installation

How to use

Configuration

It's possible to adjust the R program used through to following variable.

 (setq r-vterm-repl-program "/path/to/program")

Hence, it's possible to use something like radian instead of R native console by including the following in your config.

 (setq r-vterm-repl-program "radian")

Key bindings

r-vterm-mode

Key Command / Description
------------------------------------------------------------------------------------------
C-c C-z r-vterm-switch-to-repl-buffer
 Switch to the paired REPL buffer or to the one with a specified session name.
 With prefix ARG, prompt for session name.
C-<return> r-vterm-send-region-or-current-line
 Send the content of the region if the region is active, or send the current
 line.
C-c C-b r-vterm-send-buffer
 Send the whole content of the script buffer to the R REPL line by line.
C-c C-i r-vterm-send-include-buffer-file
 Send a line to evaluate the buffer's file using include() to the R REPL.
 With prefix ARG, Revise.includet() is used instead.
C-c C-d r-vterm-send-cd-to-buffer-directory
 Send cd() function call to the R REPL to change the current working
 directory of REPL to the buffer's directory.

r-vterm-repl-mode

Key Command / Description
------------------------------------------------------------------------------------------
C-c C-z r-vterm-repl-switch-to-script-buffer
 Switch to the script buffer that is paired with the current R REPL buffer.
M-k r-vterm-repl-clear-buffer
 Clear the content of the R REPL buffer.
C-c C-t r-vterm-repl-copy-mode
 Enter copy mode.

r-vterm-repl-mode (copy mode)

Key Command / Description
------------------------------------------------------------------------------------------
C-c C-t r-vterm-repl-copy-mode
 Exit copy mode.
<return> r-vterm-repl-copy-mode-done
 Copy the region to the kill ring and exit copy mode.
C-c C-r vterm-reset-cursor-point
 Call the vterm command that moves point to where it should be.