Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
619 B

local map = vim.api.nvim_set_keymap
map('n', '<C-t>', "<Cmd>ToggleTerm direction=horizontal<CR>", {
noremap = true,
desc = "Create terminal split"
})
map('n', '<C-s>', "<Cmd>ToggleTerm direction=float<CR>", {
noremap = true,
desc = "Toggle terminal floating"
})
local trim_spaces = true
vim.keymap.set("v", "<Leader>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', '<esc>', [[<C-\><C-n>]], opts)
end,
})