Open and close a terminal inside Neovim with one key without losing the running process, such as a test watcher or build script
Keep multiple numbered terminal sessions open at the same time and switch between them while editing code
Send a test command directly from the Neovim editor to a terminal window without switching focus or retyping the command
Requires Neovim 0.7 or newer. Install through any standard Neovim plugin manager. Configure via a Lua setup() call.
toggleterm.nvim is a plugin for Neovim, a keyboard-driven code editor, that makes it easier to open, hide, and switch between terminal windows while editing. Neovim has a built-in terminal, but opening and managing multiple terminal sessions inside the editor can be awkward. This plugin adds a simple toggle mechanism: press a key to open a terminal, press it again to hide it, and it stays running in the background with whatever process you left in it. The plugin supports four display styles. A terminal can open as a horizontal split below the editor, a vertical split to the side, a floating panel over the editor, or in its own tab. Each style can be set as the default, or individual terminals can be opened in a specific layout on demand. Multiple numbered terminals can be open at the same time, and a key prefix lets you target a specific one. Beyond simple toggling, the plugin can send commands directly to a terminal window from the editor, which is useful for running test suites, build scripts, or a language's interactive console without leaving the editor or typing the same command manually each time. Configuration is done in Lua using a setup call. Options cover the terminal size, which keyboard shortcut triggers the toggle, visual styling such as background shading, whether the terminal starts in insert mode, whether it changes directory when Neovim does, and callbacks for when the terminal opens, closes, or exits. The plugin requires Neovim 0.7 or newer and is installed through any of the standard Neovim plugin managers. The author describes it as a focused tool that wraps the terminal feature rather than a full interactive programming environment, and is intentionally conservative about adding new features. The full README is longer than what was shown.
← akinsho on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.