Skip to content

grimmjulian/pickleterm.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🥒 pickleterm.nvim

pickleterm.nvim is a lightweight Neovim plugin that lets you open, reuse, and send commands to named terminal buffers — so you can keep multiple interactive shells “pickled” for later use.

Stop spawning new terminals every time — reuse them intelligently.


✨ Features

  • 🧠 Open terminal buffers by name and automatically reuse them
  • 🚀 Send commands directly to existing terminal sessions
  • 🔁 Keeps terminals persistent between commands
  • ⚙️ Minimal Lua implementation — no dependencies

📦 Installation

Using lazy.nvim

{
  "grimmjulian/pickleterm.nvim",
}
use {
  "grimmjulian/pickleterm.nvim",
  config = function()
    require("pickleterm").setup()
  end
}

🧩 Usage

Open or focus a named terminal

require("pickleterm").setup({R = {startcmd = "R"}})
require("pickleterm").open("R")
-- or both steps in one go for setting up a single terminal:
-- require("pickleterm").open("R", "R")
  • Opens a terminal named term://R
  • If it doesn’t exist, runs the start command R

Send commands to a terminal

require("pickleterm").send_cmd("R", "summary(cars)")
  • Sends the command to the term://R buffer
  • Appends a newline automatically (simulating <Enter>)

🧠 Example Workflow

  1. Open a terminal for your R REPL:
    :lua require("pickleterm").open("R_Terminal", "R")
  2. Open another for running tests:
    :lua require("pickleterm").open("Test_Terminal", "pytest")
  3. Send commands without leaving Neovim:
    :lua require("pickleterm").send_cmd("R_Terminal", "plot(1:10)")

🧰 API Overview

Function Description
open(name, start_cmd) Open or reuse a terminal by name, optionally running a startup command.
send_cmd(name, cmd) Send a command string to a named terminal.

🪄 Planned Features

  • Idle detection
  • Different options for opening the buffer

🧑‍💻 Contributing

Pull requests and ideas are welcome!
Open an issue or PR on GitHub.


📜 License

MIT © 2025 [Julian Grimm]

About

pickleterm.nvim is a lightweight Neovim plugin that lets you open, reuse, and send commands to named terminal buffers — so you can keep multiple interactive shells “pickled” for later use. Stop spawning new terminals every time — reuse them intelligently.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages