Lightweight, language-aware REPL integration for Neovim, built on vim-slime.
Contributions are very welcomed! See Contributing
- Meant to work with Julia, Python and Matlab.
- Smart block detection for Python and Julia – sends the whole function, class, or loop the cursor lives in, not just one line
- Julia channel picker via
juliaup(uses fzf-lua when available) - Working-directory sync between Neovim and the REPL
- Buffer-local keymaps that activate only for configured filetypes and never override your existing maps
- Zero-config – works out of the box;
setup()is entirely optional
The plugin/ entrypoint does nothing on startup beyond registering a FileType autocommand. Every module is required lazily inside that callback, so the plugin has zero startup cost for unrelated filetypes.
| Requirement | Notes |
|---|---|
| Neovim ≥ 0.10 | |
| vim-slime | Must be listed as a dependency |
| tmux | Only supported transport |
| juliaup | Optional – for Julia channel picker |
| fzf-lua | Optional – for Julia channel picker UI |
{
"urtzienriquez/replent.nvim",
ft = { "python", "julia", "matlab" }, -- lazy-load on these filetypes
dependencies = { "jpalardy/vim-slime" },
-- opts = {} ← entirely optional, see Configuration below
}No setup() call is needed. Drop the spec in, open a Python or Julia file, and the keymaps are there.
Pass an opts table (lazy.nvim calls setup() for you):
{
"urtzienriquez/replent.nvim",
ft = { "python", "julia", "matlab" },
dependencies = { "jpalardy/vim-slime" },
opts = {
filetypes = { "python", "julia" }, -- remove matlab
keymaps = {
start_python = "<leader>rp", -- remap
debug_block = false, -- disable
},
repl_commands = {
python = "ipython", -- change launch command
},
},
}Or without lazy.nvim:
require("replent").setup({
keymaps = { send_buffer = false },
})All keymaps are buffer-local and only appear for configured filetypes. A mapping is silently skipped when you already have a buffer-local map on that key.
| Config key | Default | Mode | Action |
|---|---|---|---|
send_line |
<CR> |
n | Send block / line at cursor |
send_selection |
<CR> |
v | Send visual selection |
send_buffer |
<leader>sb |
n | Send entire buffer |
start_python |
<leader>op |
n | Open Python REPL |
start_julia |
<leader>oj |
n | Open Julia REPL (channel picker) |
start_matlab |
<leader>om |
n | Open MATLAB REPL |
close_python |
<leader>qp |
n | Close Python REPL |
close_julia |
<leader>qj |
n | Close Julia REPL |
close_matlab |
<leader>qm |
n | Close MATLAB REPL |
sync_cwd |
<leader>cd |
n | Sync Neovim cwd → REPL |
julia_instantiate |
<leader>ji |
n | Pkg.activate + Pkg.instantiate |
debug_block |
<leader>bc |
n | Debug block detection |
local replent = require("replent")
replent.setup(opts) -- optional configuration
replent.send_block() -- send block/line at cursor
replent.send_selection() -- send visual selection
replent.send_buffer() -- send entire buffer
replent.start_repl("python") -- open a REPL
replent.close_repl("julia") -- close a REPL
replent.sync_cwd() -- sync working directory
replent.has_active_repl() -- → booleanContributions are very welcome — bug reports, suggestions, and especially code. If you use a language or workflow that replent doesn't handle well, opening an issue or a pull request is the best way to improve it. Adding smart block detection for a new language (see lua/replent/julia.lua or lua/replent/python.lua for the pattern) or support for a new REPL transport are particularly impactful contributions.
-
R.nvim — the biggest inspiration for replent, and the best example of language-specific REPL integration in Neovim. If you work with R, use this — it offers a dedicated R communication layer, live autocompletion from your R environment, an object browser, inline help, and deep Quarto/RMarkdown support, among others.
-
matlab.nvim — another big inspiration for this plugin. It is simple, yet very powerful to develop and work with the matlab programming language in neovim. It uses tmux to communicate neovim with matlab.
-
vim-slime — the transport layer replent is built on. If you don't need smart block detection or language-specific features, vim-slime alone may be all you need.
-
iron.nvim — a full-featured REPL manager for Neovim. Supports many languages and transports, manages multiple REPLs simultaneously, and has its own send-motion system. More batteries included than replent, but also more configuration.
-
molten-nvim — Jupyter kernel integration for Neovim. The right choice if you want inline output rendered directly in the buffer rather than a terminal pane.
-
yarepl.nvim — another lightweight REPL plugin with multi-REPL support, parallel sessions, buffer attachments, and a flexible layout system. Worth a look if you need to run several REPLs side by side or want AI CLI (Aider, Codex) integration.
GNU General Public License v3.0 — see LICENSE.