Skip to content

Commit

Permalink
feat(toggleterm): Add convinient user commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Allaman committed Mar 22, 2024
1 parent c815d7b commit eae52de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/core/plugins/toggleterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ local M = {
end,
desc = "Mappings for navigation with a terminal",
})

vim.api.nvim_create_user_command("Exec", function(opts)
require("toggleterm").exec(opts.args)
end, { desc = "Run TermExec with the given command", nargs = "*" })

vim.api.nvim_create_user_command("Tldr", function(opts)
require("toggleterm").exec("tldr " .. opts.args)
end, { desc = "Run tldr with the given argument", nargs = 1 })
end,
}

Expand Down

0 comments on commit eae52de

Please sign in to comment.