Closed sleeptightAnsiC closed 1 month ago
ahh, I see I also removed !
from startinsert!
but this doesn't make any difference in case of Terminals.
Feel free to revert it. PR is open for edits.
Thanks for opening the PR, I tested it out, this doesn't seem to be affecting the default commands.
I am skipping this for now to not break compatibility, will refer if need in future.
Hey again @2KAbhishek,
There is a problem with binding
startinsert
toTermOpen
: If a terminal gets opened in the background, it will always start Insert mode, even if you're not using said Terminal directly, which in this case is undesired and annoying. For example, I spotted mentioned issue while starting debug session in nvim-dap.I fixed this by adding a branch that checks whether the currently open buffer is the
event.buf
. I couldn't solve it from lua and had to use vimscript, probably becausevim.cmd()
adds a delay to the call.This fixes the issue on my side but have in mind that I don't use termim.nvim directly, just few functions from your plugin that makes my config behave in similar way. So probably it would be nice if you could test it on your side.
Cheers