Open siduck opened 2 years ago
Spawnable term window could be like :
:execute 'terminal' | let b:term_type = 'wind' | startinsert <CR>"
idk if it would be possible to toggle a term window buffer
this is functionally equivalent to just doing :term
I can take a look at enabling this so things like sending commands to the term works after finals some time next week.
FYI: Buffers aren't windows. Neovim terminology is very specifc, this really confused me until I remembered you use bufferline....
yes ik its :term, but it would be nice to toggle it and hide it too :thinking:
This is because it fundamentally is not how windows function. Buffers are not windows.
I know how to implement this, but both can't until next week, and am not sure I should given that functionally there's no difference between this and literally doing C-z
running your command in the normal term, and then fg
to resume.
In fact, doing suspend and resume strategy is actually much better since native term is much faster than neovim emulator.
C-z exits nvim
C-z exits nvim
This is not true. C-z suspends a program to the background. Run 'fg' (foreground) and it will come back up exactly where it left off.
It's equivalent to creating a new tab page or something which is what you refer to as a "window"
Is this issue related to functionality where toggle
opens a new terminal if not already open?
Is this issue related to functionality where
toggle
opens a new terminal if not already open?
no, this is for toggling new terminal window ( listed ) if thats possible @zbirenbaum
Is this issue related to functionality where
toggle
opens a new terminal if not already open?no, this is for toggling new terminal window ( listed ) if thats possible @zbirenbaum
Again, what you are referring to here as a window is actually a buffer. The implementation of the behavior you are describing would be to replace the buffer in the current window with a terminal and then restore it on toggle. I just took some time to see how it would have to be implemented and came across a few problems.
This would make much more sense if it opened in a new tabpage, which would actually provide the behavior you want and have none of the above issues, but would not integrate with the plugins that treat buffers as tabs. For that reason, while I am happy to implement this with a tabpage,
I don't want to do this the way you are thinking about it, as it:
It isn't undoable, so if it would really mean a lot to you to have this feature, I am willing to put in that effort to write it at some point, but I am going to have to give priority to some other features I am working on in other repos at the moment.
If you want the tabpage implementation, it would be extremely quick to write, and I can do it immediately.
@siduck Let me know your thoughts, and please read this carefully, as all of the above info is relevant.