Open lluar opened 3 years ago
So do I.
Reproduce :
init.lua
vim.cmd("autocmd TermOpen * startinsert")
task.ini
[git-lazygit]
command=lazygit
cwd=$(VIM_CWD)
output=terminal
pos=tab
close=1
Result: use :terminal
will open a terminal buffer and switch to insert mode.
However, use AsyncTask
open a terminal buffer, it will stay in normal mode.
what about use asyncrun:
:AsyncRun -mode=term -pos=tab lazygit
When I run a task then the terminal running in a new tab ignores my autocmd for TermOpen.
vim.cmd "autocmd TermOpen term://* startinsert"
The Terminal is always in normal mode.