Summary Files Commits Branches @commit @diff @stats
path: root / lua / text.lua
diff options
context:
space:
mode:
Commit2a22c1fd7d87e99534220936b409164f4b631c3e (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-03-11 14:42:56 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-03-11 14:42:56 +0200
Files51ca26b56299649762125146c476ecb9e2e2cdb7 /lua/text.lua
anderson-2a22c1fd7d87e99534220936b409164f4b631c3e.tar
anderson-2a22c1fd7d87e99534220936b409164f4b631c3e.tar.gz
anderson-2a22c1fd7d87e99534220936b409164f4b631c3e.zip
Parentc0a43d03b6c6fa2dc1d21d1105ef5aee4bee0cf7 (diff)
[text] Force terminal mode when inside a terminal buffer
1 files changed, 5 insertions, 0 deletions
-rw-r--r--lua/text.lua5
diff --git a/lua/text.lua b/lua/text.lua
index 97cb85a..0adea2d 100644
--- a/lua/text.lua
+++ b/lua/text.lua
@@ -25,3 +25,8 @@ vim.o.shiftwidth = 4
vim.o.splitbelow = true
vim.o.splitright = true
+vim.api.nvim_create_autocmd({ "BufEnter" }, { callback = function (ev)
+ if vim.bo.buftype == "terminal" then
+ vim.cmd("startinsert")
+ end
+end })