Skip to content

ilan-schemoul/nvim-simple-send-to-term

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

What is it

A plugin to send a command to the terminal most recently opened (which is visible on the current tab).

How is it different from similar plugins

Unlike other similar plugins this plugin automatically choose a terminal (the most recent one) so you do not have to "mark" the terminal you want to use.

Use case

I mainly use with a keymap to quickly repeat last command (SendToTerm !!).

Setup

Like any other plugin add "ilan/nvim-send-to-first-term" to your package manager and call require("nvim-send-to-first-term").setup().

Lazy

{
  "ilan-schemoul/nvim-send-to-first-term",
  opts = {},
}

Commands

:SendToTerm <command>

If no command is provided an input is shown to you so you can type your command.

The last opened, non-hidden, terminal in your current tab is used. If no terminal is found a new one is created and the command is sent to it.

Example of keybinding

-- Repeat last command
vim.keymap.set("n", "<leader>pr", "<cmd>SendToTerm !!<cr>")
-- Open a ui input so you can type any command
vim.keymap.set("n", "<leader>ps", "<cmd>SendToTerm<cr>")
-- Run make
vim.keymap.set("n", "<leader>ps", "<cmd>SendToTerm make<cr>")

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages