asynctasks.vim icon indicating copy to clipboard operation
asynctasks.vim copied to clipboard

The terminal ignores TermOpen autocmd

Open lluar opened this issue 4 years ago • 2 comments

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.

lluar avatar Jun 16 '21 09:06 lluar

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.

MaiLunJiye avatar Apr 27 '23 12:04 MaiLunJiye

what about use asyncrun:

:AsyncRun -mode=term -pos=tab lazygit

skywind3000 avatar Apr 27 '23 12:04 skywind3000