I would like to create a new scratch buffer in vim script. I would like to use this buffer to output the result of the execution of a scala script.
I am creating the buffer with this function:
setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile
then I call it as follows:
let outputBuf = ScratchBuffer()
outputbuf should contain the buffer number. However, this doesn't seem to work. I need the buffer number in order to then use the buffer in a python script.