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

  1. local map = vim.api.nvim_set_keymap
  2. map('n', '<C-t>', "<Cmd>ToggleTerm direction=horizontal<CR>", {
  3. noremap = true,
  4. desc = "Create terminal split"
  5. })
  6. map('n', '<C-s>', "<Cmd>ToggleTerm direction=float<CR>", {
  7. noremap = true,
  8. desc = "Toggle terminal floating"
  9. })
  10. local trim_spaces = true
  11. vim.keymap.set("v", "<Leader>s", function()
  12. require("toggleterm").send_lines_to_terminal("visual_selection", trim_spaces, { args = vim.v.count })
  13. end)
  14. vim.api.nvim_create_autocmd("TermOpen", {
  15. pattern = "term://*",
  16. callback = function()
  17. vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
  18. end,
  19. })