From 3c238894c5b6f15c5f27cea8bd3785eb0f1ebf0f Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 18 Sep 2022 11:39:25 +0200 Subject: add config --- lua/maps/terminal.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/maps/terminal.lua (limited to 'lua/maps/terminal.lua') diff --git a/lua/maps/terminal.lua b/lua/maps/terminal.lua new file mode 100644 index 0000000..cf6f999 --- /dev/null +++ b/lua/maps/terminal.lua @@ -0,0 +1,37 @@ +vim.api.nvim_set_keymap( + "n", + "t", + ":lua toggle_terminal(vim.g.terminal_height)", + {silent = true, noremap = true} +) + +vim.api.nvim_set_keymap( + "i", + "t", + ":lua toggle_terminal(vim.g.terminal_height)", + {silent = true, noremap = true} +) + +vim.api.nvim_set_keymap( + "t", + "t", + ":lua toggle_terminal(vim.g.terminal_height)", + {silent = true, noremap = true} +) + +-- Terminal go back to normal mode +vim.api.nvim_set_keymap( + "t", + "", + "", + {noremap = true} +) + +vim.api.nvim_set_keymap( + "t", + ":q!", + ":q!", + {noremap = true} +) + + -- cgit v1.2.3-18-g5258