diff --git a/dots/.config/nvim/after/ftplugin/termhistory.lua b/dots/.config/nvim/after/ftplugin/termhistory.lua new file mode 100644 index 00000000..1ad6e237 --- /dev/null +++ b/dots/.config/nvim/after/ftplugin/termhistory.lua @@ -0,0 +1,13 @@ +vim.opt_local.number = false +vim.opt_local.relativenumber = false +vim.keymap.set("n", "q", "quit!", { + buffer = true, + remap = true, +}) + +vim.keymap.set("n", "i", function() + vim.notify("Insert mode disabled in termhistory") +end, { + buffer = true, + remap = true, +}) diff --git a/dots/.config/wezterm/config/events.lua b/dots/.config/wezterm/config/events.lua index 9ed06a7d..d17954b7 100644 --- a/dots/.config/wezterm/config/events.lua +++ b/dots/.config/wezterm/config/events.lua @@ -8,7 +8,7 @@ wezterm.on("trigger-nvim-with-scrollback", function(window, pane) f:write(scrollback) f:flush() f:close() - window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name } } }), pane) + window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name, "+$", "-R" , "+set filetype=termhistory"} } }), pane) wezterm.sleep_ms(1000) os.remove(name)