From 27ffa222936ce9f640f3f9e59e76ed2cb1187618 Mon Sep 17 00:00:00 2001 From: asep komarudin Date: Sun, 25 Feb 2024 18:52:25 +0700 Subject: [PATCH] add: mapping wezterm new tab and load new window --- lua/user/whichkey.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/user/whichkey.lua b/lua/user/whichkey.lua index c00389c..b4cd5db 100644 --- a/lua/user/whichkey.lua +++ b/lua/user/whichkey.lua @@ -74,6 +74,16 @@ function _OPEN_ALACRITTY() vim.cmd("silent !alacritty --working-directory " .. vim.fn.getcwd()) end +function _OPEN_WEZTERM() + -- open wezterm new windows current directory + vim.cmd("silent !wezterm start --cwd " .. vim.fn.getcwd()) +end + +function _OPEN_WEZTERM_TAB() + -- open new tab wezterm current directory + vim.cmd('silent !wezterm cli spawn --cwd "' .. vim.fn.getcwd() .. '"') +end + local setup = { plugins = { marks = true, -- shows a list of your marks on ' and ` @@ -323,6 +333,8 @@ local mappings = { v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, s = { "ToggleTerm direction=tab", "New Tab" }, a = { "lua _OPEN_ALACRITTY()", "Open Alacritty" }, + w = { "lua _OPEN_WEZTERM()", "Open Wezterm" }, + t = { "lua _OPEN_WEZTERM_TAB()", "Open Tab Wezterm" }, }, r = { name = "  Run",