From 84eaa3fec23cfb89d775ae43795c234b05649edd Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 4 Jan 2024 10:26:24 +0100 Subject: up --- .config/nvim/after/plugin/toggleterm.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/nvim/after/plugin/toggleterm.lua b/.config/nvim/after/plugin/toggleterm.lua index 961db87..766de24 100644 --- a/.config/nvim/after/plugin/toggleterm.lua +++ b/.config/nvim/after/plugin/toggleterm.lua @@ -8,7 +8,7 @@ require("toggleterm").setup({ start_in_insert = true, insert_mappings = true, persist_size = true, - direction = "float", + direction = "horizontal", close_on_exit = true, shell = vim.o.shell, float_opts = { @@ -20,3 +20,10 @@ require("toggleterm").setup({ }, }, }) + +function _G.set_terminal_keymaps() + local opts = {noremap = true} + vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) +end + +vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') -- cgit v1.2.3