/sɛnt/ : holy [hu], past of send [en]
text
A tiny Neovim bridge that sends code from your current buffer to a tmux REPL using safe bracketed paste.
- Target any tmux pane and paste via
load-buffer/paste-buffer -p. - Send from visual selection, paragraph or cell.
- Highlights the szent code (shoutout
vim.hl.rangefor including a timeout) - Checks that the target pane runs a known REPL command before sending.
- Neovim 0.10 or newer.
- A running tmux session with bracketed paste enabled.
Using lazy.nvim:
{
"lfrati/szent.nvim",
config = function()
local szent = require("szent")
szent.setup {
repl_commands = { "python", "ipython", "uv" },
}
-- keybindings are not set by default ♻️
vim.keymap.set("x", "<leader><leader>p", "<Plug>(SzentVisual)")
vim.keymap.set("n", "<leader><leader>p", "<Plug>(SzentParagraph)")
vim.keymap.set("n", "<leader><leader>r", "<Plug>(SzentCellAndMove)")
end
}:SzentConfigprompts for a tmux pane to send text to (in case you changed your mind about:.2).
send_visual(), try to guess.send_paragraph(), another cryptic one.send_cell({move = true})sends the current delimited cell (defaults to# %%), and then moves the cursor to the next cell.send_cell({move = false})sends the current delimited cell (defaults to# %%), and then... nothing.
| Szent succesfully | Error while szending |
|---|---|
![]() |
![]() |
Code sent succesfully is highlighted with Visual |
|
Tip: use text objects for the cell content:
vim.keymap.set({"o","x"}, "ic", ":<C-u>lua require('szent').select_cell_inner()<CR>", { silent = true, desc = "inside cell" })
vim.keymap.set({"o","x"}, "ac", ":<C-u>lua require('szent').select_cell_around()<CR>", { silent = true, desc = "around cell" })All options are optional (duh.) and are merged with the defaults below:
require("szent").setup({
target_pane = ":.2", -- tmux pane target default (session:window.pane)
cell_delimiter = [[^\s*#\s*%%]], -- pattern that marks cell boundaries
repl_commands = {}, -- optional commands to assert before sending
timeout = 200, -- highlight timeout in milliseconds
})Customize the popup picker colors with the exposed namespace:
'SzentCmd' : color pane command
'SzentActive' : color for the * marking the active pane
'FloatBorder' : color for the popup border
'FloatTitle' : color for the popup title
'Normal' : base text color in the popup
defining your own colors as follows:
local ns = require("szent").ui_namespace()
vim.api.nvim_set_hl(ns.popup, "FloatBorder", { fg = "#00ff00" })

