:split | terminal
:vsplit | terminal
Or you can use the shorter :vs | te or :vs +te.
and you can assign maps for that like:
nmap <C-S-P> :split | terminal <CR>
Section :help terminal-api includes a thorough description of the API and also an example function:
function Tapi_Impression(bufnum, arglist)
if len(a:arglist) == 2
echomsg "impression " . a:arglist
echomsg "count " . a:arglist
Then inside a :term you can call this function by sending a special sequence ...
Is there a reason you open each file in a different tab with -p? The standard way to open multiple files is to open them in different buffers. See this answer for more about buffers vs windows vs tabs.
You can cycle through the buffer displayed in the top window with :bnext and similar. The workflow I would suggest to achieve what you want would be ...
Option 1 (not in Gvim): Use CTRL-Z to suspend Vim. That will give you Vim's parent shell.
To go back to Vim, enter fg in the command line.
Option 2: Spawn a terminal in a Vim window with :ter (or :terminal). Now, go back to the original
window with CTRL-W CTRL-W and press CTRL-W _ to maximize its height. Note that the terminal
window will still occupy one ...