summaryrefslogtreecommitdiff
path: root/fnl/conf/events.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/conf/events.fnl')
-rw-r--r--fnl/conf/events.fnl12
1 files changed, 12 insertions, 0 deletions
diff --git a/fnl/conf/events.fnl b/fnl/conf/events.fnl
index cdc672b..883611d 100644
--- a/fnl/conf/events.fnl
+++ b/fnl/conf/events.fnl
@@ -19,3 +19,15 @@
{:pattern ["*"]
:callback save-session
:group "conf#events"})
+
+(vim.api.nvim_create_autocmd [:BufWinEnter :WinEnter]
+ {:pattern ["term://*"]
+ :callback (fn []
+ (vim.cmd :startinsert))
+ :group "conf#events"})
+
+(vim.api.nvim_create_autocmd [:BufLeave]
+ {:pattern ["term://*"]
+ :callback (fn []
+ (vim.cmd :stopinsert))
+ :group "conf#events"})