feat(plugins/toggleterm): add keymap to rename terminal
This commit is contained in:
parent
d2cfded674
commit
714a000001
1 changed files with 14 additions and 0 deletions
|
|
@ -79,5 +79,19 @@ _:
|
|||
action = "<C-\\><C-n>";
|
||||
options.desc = "Switch to normal mode";
|
||||
}
|
||||
{
|
||||
mode = [ "n" "t" ];
|
||||
key = "<Leader>tn";
|
||||
action.__raw = ''
|
||||
function()
|
||||
local curterm = require("toggleterm.terminal").get_focused_id()
|
||||
|
||||
if curterm ~= nil then
|
||||
vim.cmd(curterm .. "ToggleTermSetName")
|
||||
end
|
||||
end
|
||||
'';
|
||||
options.desc = "Rename current terminal";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue