vim: intelligently close window