https://github.com/thhaase/micro-rrepl
Plugin for the micro terminal texteditor allowing REPL-based workflows
https://github.com/thhaase/micro-rrepl
micro-editor micro-editor-plugin r r-programming
Last synced: about 2 months ago
JSON representation
Plugin for the micro terminal texteditor allowing REPL-based workflows
- Host: GitHub
- URL: https://github.com/thhaase/micro-rrepl
- Owner: thhaase
- Created: 2025-06-19T14:22:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-11-10T11:04:40.000Z (7 months ago)
- Last Synced: 2025-11-10T13:05:43.236Z (7 months ago)
- Topics: micro-editor, micro-editor-plugin, r, r-programming
- Language: Lua
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# micro-rrepl
This plugin turns micro into an extremely simple and lightweight R ID. It integrates an interactive terminal with tmux for the REPL workflow most R users are used to.
## Usage
### Start
Execute `> rrepl` as a micro-command to start the R session
`ctrl + q` closes the r-session (and stops the tmux process in the background automatically)
### Interact
- `Ctrl + R` sends the current line of the cursor or the selected lines to the R session
- `Ctrl + P` inserts a baseR pipe
- `Ctrl + #` inserts the R assign arrow " <- "
### More
- `> rrepl-stop` kills R and cleans up
## Installation
**Linux:**
```
wget https://github.com/thhaase/micro-rrepl/archive/main.zip -O rrepl.zip
unzip rrepl.zip
mkdir -p ~/.config/micro/plug/rrepl
mv micro-rrepl-main/* ~/.config/micro/plug/rrepl/
rmdir micro-rrepl-main
rm rrepl.zip
```
## tmux styling
For the plugin to work you need tmux:
```
sudo apt update
sudo apt install tmux
```
I found the default tmux a bit bland. Tmux look and usage can be customized with a `.tmux.conf` file.
First download the catpuccin theme:
```
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone -b v2.1.3 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
```
(more info [in the according repository](https://github.com/catppuccin/tmux/blob/main/docs/tutorials/01-getting-started.md))
After that copy the following code to create my `.tmux.conf` file.
```
# ---- CATPUCCIN SETUP ----
set -g @catppuccin_flavor 'mocha'
run-shell ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# Make the status line more pleasant.
set -g status-left ""
set -g status-right '#[fg=#{@thm_crust},bg=#{@thm_teal}] session: #S '
# Ensure that everything on the right side of the status line
# is included.
set -g status-right-length 100
# ---- ----
```