Open seb-mueller opened 4 years ago
This should do what you are asking for I think: :call neoterm#new({'from_event': 1})
Brilliant, exactly what I was looking for! For convenience, I've added the following to my vimrc, I believe this might be useful to other looking for this:
command! TMakeNeoterm call neoterm#new({'from_event': 1})
Ever since the latest commit https://github.com/kassio/neoterm/commit/1283da9f078669593f3828e4345b68b59ee9740f this has stopped working. Upon call neoterm#new({'from_event': 1})
on a manually created terminal, neoterm opens a new split (with new neoterm) rather than declaring it to a neoterm.. Any suggestion on how to fix this?
Just to add, I believe the following line is causing this to happen:
Naivly, I've tried to call
call neoterm#new({'from_session': 1, 'id': l:id, 'termid': l:id})
instead of call neoterm#new({'from_event': 1})
which didn't work, since l:id
is not defined, and also replacing l:id
by a number doesn't work. Maybe I'm missing something here but can't quite figure out how to make it work, any help is appreciated!
Is your feature request related to a problem? Please describe. Sometimes I have already a term open that have special properties that can't be achieved by
:Topen
etc. It would be nice to declare such a term as a neoterm, i.e. being able to use it like a term created via:Topen
Describe the solution you'd like Introducing a command that i.e.
:TasNeoterm
or something like that which would declare the current term as a neoterm. E.g. in neovim invoke:split | :term
or create a term in any other way, then:TasNeoterm
to include it in the list of neoterm with its own id.Maybe this is already possible, but I seem to not be able to find how to do this.