require("toggleterm").setup({ open_mapping = [[]] }) function _G.set_terminal_keymaps() local opts = { buffer = 0 } -- Switching between terminal and normal mode inside terminal window vim.keymap.set("t", "", [[]], opts) vim.keymap.set("t", "jk", [[]], opts) vim.keymap.set("t", "kj", [[]], opts) end vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")