Closed monkoose closed 6 years ago
This is intentional, you could use an abbreviation cabbev t Ttoggle \| T
, this way when you type :t
(actually, when you hit the space after the t
) it'll be expanded to Ttoggle | T
, opening the neoterm for you. :)
@kassio But if you already have visible neoterm window, then it will be closed. And more ofter i need this feature for custom functions + hotkey bindings Maybe someone will need some hack for this request as me, for custom functions that already send something to the terminal you can use this code at the end of the function's body
function! YourFunction()
T ......(your code here)
if bufwinnr(g:neoterm.last().buffer_id) <= 0
call g:neoterm#open(g:neoterm.last())
end
endfunction
You're right! Actually, the right way to do it would be joining :Topen
with :T
, like: cabbev t Topen \| T
. This way, if the neoterm is already open nothing will change. How does it sound?
Also, for mappings/functions you can use the |
as well, like:
nnoremap <silent> <leader>tl :<c-u>exec printf('%sTopen \| T ls', v:count)<cr>
Thank you. I will try your solutions of the request.
When there is no any terminal buffer then when you send any command with
:T
or REPLSend then depends on your setup neoterm split-window "popup". But if you toggle or close it (not bdelete!) then sending any command doesn't "popup" it. So you need to toggle it manually. Did i miss something in the documentation? Any possible solution for this request?