Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luiarthur/repl.vim
Launching REPL from VIM/NeoVIM
https://github.com/luiarthur/repl.vim
Last synced: about 1 month ago
JSON representation
Launching REPL from VIM/NeoVIM
- Host: GitHub
- URL: https://github.com/luiarthur/repl.vim
- Owner: luiarthur
- License: mit
- Created: 2023-03-11T21:06:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T19:18:05.000Z (almost 2 years ago)
- Last Synced: 2023-08-03T08:08:08.005Z (over 1 year ago)
- Language: Vim Script
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> *repl*
_ _ ~
_ __ ___ _ __ | |_ _(_)_ __ ___ ~
| '__/ _ \ '_ \| \ \ / / | '_ ` _ \ ~
| | | __/ |_) | |\ V /| | | | | | | ~
|_| \___| .__/|_(_)_/ |_|_| |_| |_| ~
|_| ~- Launching REPL from (Neo)VIM.
- Author: Arthur Lui
- Date: 11 March 2023
- Repo: https://github.com/luiarthur/repl.vim### Dependencies
> *repl-dependencies*- NeoVIM >= 0.5 or VIM >= 8.2
### Installation
> *repl-installation*If using the `plug.vim` plugin manager, add `Plug luiarthur/repl.vim` to the
correct location. Similar for other vim plugin managers. If not using a plugin
manager, just copy `plugin/repl.vim` to `~/.vim/plugin/` (for vim users). If
using NeoVIM, a plugin manager is recommended.### Usage
> *repl-usage*1. Open a file in (Neo)VIM.
2. In `Normal` mode, type `Ctrl-k`. If the file extension is of a supported
language (see below), then an appropriate REPL will be spawned in a separate
buffer in the lower region of the current tab.
3. Navigation (see below)### Navigation
> *repl-nav*From a (Neo)VIM buffer (file), you can do the following in `Normal` mode.
Action | Command
---------------------------------------- |--------------------------------------------------
Start REPL (see above) | `Ctrl-k`
Source the file (language is supported) | `Ctrl-h` anywhere in file
Send current line to REPL below | `Ctrl-j` on a line
Send current line to REPL on right | `Ctrl-l` on a line
Send the selected lines to REPL below | `Ctrl-j` on a visual selection of multiple lines
Send the selected lines to REPL on right | `Ctrl-l` on a visual selection of multiple linesNote that the REPL (and buffers) will be in `Normal` mode, but lines from the
buffer will be executed in the REPLs.The default key-bindings can be remapped. For example, the default bindings are
defined as follows:Action | Default key-binding
---------------------------------------- |------------------------------------------
Start REPL | `nmap ReplStartTermBelow`
Source the file | `nmap ReplSourceFile`
Send current line to REPL below | `nmap ReplSendDown`
Send current line to REPL on right | `nmap ReplSendRight`
Send the selected lines to REPL below | `xmap ReplSendDownV`
Send the selected lines to REPL on right | `xmap ReplSendRightV`Default key bindings will be used if either `let g:repl_default_key_bindings = 1`
is defined in `init.vim`/`vimrc` (NeoVIM/VIM) OR `g:repl_default_key_bindings`
is not defined.### Supported Languages
> *repl-languages*- Julia (`*.jl`)
- Python (`*.py`)
- R (`*.R`)### About
> *repl-about*Inspired by `https://github.com/karoliskoncevicius/vim-sendtowindow`.