tags:

views:

627

answers:

3

I close a tab in vim and immediately realize I need to re-open it again for something. Is there a way to undo close tab in Vim 7.2?

+3  A: 

Simple answer is no, there is nothing built-in.

But a workable solution would be to use a plug-in like the excellent BufExplorer. Since it defaults to listing the most recently used buffers first, reopening a closed tab would be as simple as pressing \bet

Ben Hoffstein
+7  A: 

Your file is probably still open in a buffer:

:ls " get the buffer number
:tabnew +Nbuf " where N is the buffer number
greyfade
doesn't work for me
Chris
It does for me. I tried it out just before posting.
greyfade
+1  A: 

I'm using an MRU (most recently used files) plugin. So I can edit the last 30 files I've just edited

Here are the MRU plugin metadata:

File: mru.vim
Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
Version: 3.2   Last Modified:
September 22, 2008
Oli