From 8644dab665ccb76f3950e287c56442347f5fa0bc Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 6 Aug 2022 15:28:32 +0200 Subject: Add nav key maps to toggleterm --- fnl/config/toggleterm.fnl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'fnl/config/toggleterm.fnl') diff --git a/fnl/config/toggleterm.fnl b/fnl/config/toggleterm.fnl index 87d9eb6..1aaee62 100644 --- a/fnl/config/toggleterm.fnl +++ b/fnl/config/toggleterm.fnl @@ -1,6 +1,15 @@ ;; Terminal inside nvim. -(module config.toggleterm {autoload {: util}}) +(module config.toggleterm {autoload {: util nvim aniseed.nvim}}) (def- opts {:shade_terminals false}) +(defn- set-terminal-keymaps [] + (nvim.set_keymap :t : "wincmd h" {}) + (nvim.set_keymap :t : "wincmd j" {}) + (nvim.set_keymap :t : "wincmd k" {}) + (nvim.set_keymap :t : "wincmd l" {})) + (util.use-config :toggleterm opts) +(util.autocmd :TermOpen + {:pattern "term://*toggleterm#*" + :callback set-terminal-keymaps}) -- cgit v1.2.3-70-g09d2