local map = vim.api.nvim_set_keymap map('n', '', "ToggleTerm direction=horizontal", { noremap = true, desc = "Create terminal split" }) map('n', '', "ToggleTerm direction=float", { noremap = true, desc = "Toggle terminal floating" }) local trim_spaces = true vim.keymap.set("v", "s", function() require("toggleterm").send_lines_to_terminal("visual_selection", trim_spaces, { args = vim.v.count }) end) vim.api.nvim_create_autocmd("TermOpen", { pattern = "term://*", callback = function() vim.keymap.set('t', '', [[]], opts) end, })