Summary Files Commits Branches @commit @diff @stats
path: root / lua / onfiletype.lua
diff options
context:
space:
mode:
1 files changed, 9 insertions, 0 deletions
-rw-r--r--lua/onfiletype.lua9
diff --git a/lua/onfiletype.lua b/lua/onfiletype.lua
new file mode 100644
index 0000000..c814a3b
--- /dev/null
+++ b/lua/onfiletype.lua
@@ -0,0 +1,9 @@
+--[=[ Terminal buffers ]=]--
+
+vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
+ pattern = "term://*",
+ command = "setlocal nonu | startinsert",
+})
+vim.api.nvim_create_autocmd("TermClose", {
+ command = "quit!"
+})