I want to make toggleable window with terminal buffer similar to every IDE terminal feature.
Currently i have mapped:
noremap <F4> :botright 8split term://bash<CR> tnoremap <F4> <C-\><C-n>:q<CR> autocmd BufEnter term://* startinsert | set wfh
but buffer is lost whenever is not active on any window (ex. on :q)
EDIT And how to reopen the same buffer whenever it already eixsts instead of creating new one every time?