feat: add back autocmd insert mode on terminal open
This commit is contained in:
parent
ac0200734b
commit
2d648650d0
2 changed files with 10 additions and 0 deletions
1
init.lua
1
init.lua
|
|
@ -1,5 +1,6 @@
|
||||||
require("config.options")
|
require("config.options")
|
||||||
require("config.keymaps")
|
require("config.keymaps")
|
||||||
|
require("config.autocmds")
|
||||||
|
|
||||||
-- Boostrap lazy.nvim
|
-- Boostrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
|
||||||
9
lua/config/autocmds.lua
Normal file
9
lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- Auto insert mode on TermOpen
|
||||||
|
vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
|
||||||
|
pattern = { "*" },
|
||||||
|
callback = function()
|
||||||
|
if vim.opt.buftype:get() == "terminal" then
|
||||||
|
vim.cmd(":startinsert")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
Loading…
Reference in a new issue