local K = require("my.keymaps") local env = require("my.helpers.env") local M = { "preservim/vimux", -- interact with tmux from within vim cmd = { "VimuxPromptCommand", "VimuxRunCommand", "VimuxRunLastCommand" }, -- TODO: only enable when actually inside tmux cond = env.vscode.not_active() and env.neovide.not_active() and env.firenvim.not_active(), } function M.init() --{{{ Register keybinds K.nmap( "vp", ":VimuxPromptCommand", "[V]imux: [p]rompt for command" ) K.nmap("vc", ':VimuxRunCommand "clear"', "[V]imux: [c]lear pane") K.nmap( "vl", ":VimuxRunLastCommand", "[V]imux: rerun [l]ast command" ) --}}} --{{{ Register which-key docs local status, wk = pcall(require, "which-key") if status then wk.register({ ["v"] = { name = "[V]imux", }, }) end --}}} end return M