turns current buffer to var