You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst testing spaceneovim I came across several terminal related issues. Most of these issues are rather easily fixed and will drastically improve the experience of using terminal splits in spaceneovim.
Using WinCmd's in neovim terminal splits
Entering insertmode when entering a terminal split using WinCmd's
closing the terminal split when the terminal process exits (or when a user manually types exit in the prompt)
Regarding the first issue, I've had this issue at first in my own neovim config aswel. The problem is that the terminal doesn't execute vim commands unless you have specific tnoremap bindings. as the documentation states:
Navigating to other windows is only possible by exiting to normal mode, which
can be cumbersome with <C-> keys.
The second issue can be solved with a single autocmd
au BufEnter * if &buftype == 'terminal' | :startinsert | endif
The third issue, I'm not sure how and if we can fix that..
When looking into this some more I discovered that there are terminal bindings defined in layers/+nav/windows/config.vim however they make use of wincmd command which isn't executed correctly when you are in insertmode in the terminal.
So replacing these with the approach I've outlined above should remedy this. I'll create a PR for this tonight.
The text was updated successfully, but these errors were encountered:
With the commit above I've added a few of these suggestions.
Ctrl-[hjkl] now works for navigating around windows in the terminal while in insert mode (and normal mode in other buffers).
You will now automatically enter insert mode whenever you enter a terminal buffer.
Not entirely sure here, there are some scenarios where you'll be running a script that exists itself, and you'll want to keep the output. Currently after exit you can simply press q and the window will close. I think this is fine for now, although having it close on user inputted exit would be perhaps a bit nicer (no idea how to hook into that though).
Moved from original issue Tehnix/spaceneovim#11, opened by @alexanderjeurissen.
Whilst testing spaceneovim I came across several terminal related issues. Most of these issues are rather easily fixed and will drastically improve the experience of using terminal splits in spaceneovim.
Regarding the first issue, I've had this issue at first in my own neovim config aswel. The problem is that the terminal doesn't execute vim commands unless you have specific
tnoremap
bindings. as the documentation states:I solved this in my own config using:
The second issue can be solved with a single
autocmd
The third issue, I'm not sure how and if we can fix that..
When looking into this some more I discovered that there are terminal bindings defined in
layers/+nav/windows/config.vim
however they make use ofwincmd
command which isn't executed correctly when you are in insertmode in the terminal.So replacing these with the approach I've outlined above should remedy this. I'll create a PR for this tonight.
The text was updated successfully, but these errors were encountered: