add proper buffer closing to vim