def create_buf(vim, scratch=0):
    """ Create buf
    Args: 
        vim (obj): nvim socket handler
        scratch (int): 0 if non-scratch
    """ 
    buf = vim.request("nvim_create_buf", 1, scratch)
    return buf