If I execute a interactive command with :terminal
, buffername will be something like: term://.//1234:command executed here with params
.
I want to be able to change it to something more meaningful to use with my fork for vim-vroom. Here is the snippet for reference:
function s:RunNeoTerminal(cmd)
" close previous openned buffer
if exists('t:vroom_terminal_bufnr') && bufexists(t:vroom_terminal_bufnr)
exec ":bd! ".t:vroom_terminal_bufnr
end
let height = winheight(0) * 1/4
exec ":belowright " . height . "split"
exec ":terminal " . a:cmd
" terminal runs by default in insert mode which kills the buffer after exit,
" let's change to normal mode
exec ":stopinsert"
let t:vroom_terminal_bufnr = bufnr('%')
endfunction
https://github.com/brodock/vim-vroom/blob/neovim-terminal/autoload/vroom.vim#L253-L267