Skip to content

Commit

Permalink
feat: startinsert on enter terminal buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill committed Aug 10, 2024
1 parent b353f99 commit 288772b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,8 @@ create_autocmd("VimEnter", function()
require("utils.vtip").fetch()
return true
end, { desc = "Fetch tips from vtip.43z.one", group = augroup })

create_autocmd({ "BufEnter", "TermOpen" }, function(e)
if vim.bo[e.buf].buftype ~= "terminal" then return end
vim.cmd.startinsert()
end, { desc = "Enter terminal mode when entering a terminal buffer", group = augroup })

0 comments on commit 288772b

Please sign in to comment.