def new_scratch_buffer(text):
 vim.command('botright new')
 vim.command('set ft=')
 vim.command('set buftype=nofile')
 vim.current.buffer[:] = text.splitlines()
 feedkeys('\\<Esc>')

def new_scratch_buffer ( text ) : vim . command ( 'botright new' ) vim . command ( 'set ft=' ) vim . command ( 'set buftype=nofile' ) vim . current . buffer [ : ] = text . splitlines ( ) feedkeys ( '\\<Esc>' )
create a new scratch buffer with the text given .