diff -r 54d621a3b561 -r 9d0a287e8603 runtime/doc/index.txt
--- a/runtime/doc/index.txt	Thu Jan 26 20:58:26 2012 +0100
+++ b/runtime/doc/index.txt	Fri Feb 03 10:26:25 2012 +0900
@@ -1517,6 +1517,7 @@
 |:tabnext|	:tabn[ext]	go to next tab page
 |:tabonly|	:tabo[nly]	close all tab pages except the current one
 |:tabprevious|	:tabp[revious]	go to previous tab page
+|:tabrecently|	:tabrecently	go to previous (last accessed) tab page
 |:tabrewind|	:tabr[ewind]	got to first tab page
 |:tabs|		:tabs		list the tab pages and what they contain
 |:tab|		:tab		create new tab when opening new window
diff -r 54d621a3b561 -r 9d0a287e8603 runtime/doc/tabpage.txt
--- a/runtime/doc/tabpage.txt	Thu Jan 26 20:58:26 2012 +0100
+++ b/runtime/doc/tabpage.txt	Fri Feb 03 10:26:25 2012 +0900
@@ -156,6 +156,9 @@
 {count}gT	Go {count} tab pages back.  Wraps around from the first one
 		to the last one.

+:tabrecently				*:tabrecently*
+		Go to the previous (last accessed) tab page.
+
 :tabr[ewind]			*:tabfir* *:tabfirst* *:tabr* *:tabrewind*
 :tabfir[st]	Go to the first tab page.

diff -r 54d621a3b561 -r 9d0a287e8603 runtime/doc/tags
--- a/runtime/doc/tags	Thu Jan 26 20:58:26 2012 +0100
+++ b/runtime/doc/tags	Fri Feb 03 10:26:25 2012 +0900
@@ -2886,6 +2886,7 @@
 :tabp	tabpage.txt	/*:tabp*
 :tabprevious	tabpage.txt	/*:tabprevious*
 :tabr	tabpage.txt	/*:tabr*
+:tabrecently	tabpage.txt	/*:tabrecently*
 :tabrewind	tabpage.txt	/*:tabrewind*
 :tabs	tabpage.txt	/*:tabs*
 :tag	tagsrch.txt	/*:tag*
diff -r 54d621a3b561 -r 9d0a287e8603 src/ex_cmds.h
--- a/src/ex_cmds.h	Thu Jan 26 20:58:26 2012 +0100
+++ b/src/ex_cmds.h	Fri Feb 03 10:26:25 2012 +0900
@@ -955,6 +955,8 @@
 			BANG|TRLBAR|CMDWIN),
 EX(CMD_tabprevious,	"tabprevious",	ex_tabnext,
 			RANGE|NOTADR|COUNT|TRLBAR),
+EX(CMD_tabrecently,	"tabrecently", ex_tabnext,
+			RANGE|NOTADR|TRLBAR),
 EX(CMD_tabNext,		"tabNext",	ex_tabnext,
 			RANGE|NOTADR|COUNT|TRLBAR),
 EX(CMD_tabrewind,	"tabrewind",	ex_tabnext,
diff -r 54d621a3b561 -r 9d0a287e8603 src/ex_docmd.c
--- a/src/ex_docmd.c	Thu Jan 26 20:58:26 2012 +0100
+++ b/src/ex_docmd.c	Fri Feb 03 10:26:25 2012 +0900
@@ -7446,6 +7446,10 @@
 	case CMD_tabNext:
 	    goto_tabpage(eap->addr_count == 0 ? -1 : -(int)eap->line2);
 	    break;
+	case CMD_tabrecently:
+	    /* search tabpage index from following first tabpage */
+	    goto_tabpage(tabpage_index(recentlytab));
+	    break;
 	default: /* CMD_tabnext */
 	    goto_tabpage(eap->addr_count == 0 ? 0 : (int)eap->line2);
 	    break;
diff -r 54d621a3b561 -r 9d0a287e8603 src/globals.h
--- a/src/globals.h	Thu Jan 26 20:58:26 2012 +0100
+++ b/src/globals.h	Fri Feb 03 10:26:25 2012 +0900
@@ -567,6 +567,7 @@
  */
 EXTERN tabpage_T    *first_tabpage;
 EXTERN tabpage_T    *curtab;
+EXTERN tabpage_T    *recentlytab;
 EXTERN int	    redraw_tabline INIT(= FALSE);  /* need to redraw tabline */
 #endif

diff -r 54d621a3b561 -r 9d0a287e8603 src/window.c
--- a/src/window.c	Thu Jan 26 20:58:26 2012 +0100
+++ b/src/window.c	Fri Feb 03 10:26:25 2012 +0900
@@ -3444,6 +3444,7 @@
     int		after;
 {
     tabpage_T	*tp = curtab;
+    tabpage_T	*recently = recentlytab;
     tabpage_T	*newtp;
     int		n;

@@ -3457,6 +3458,7 @@
 	vim_free(newtp);
 	return FAIL;
     }
+    recentlytab = tp;
     curtab = newtp;

     /* Create a new empty window. */
@@ -3785,7 +3787,7 @@
 	    return;
 	}
     }
-
+    recentlytab = curtab;
     goto_tabpage_tp(tp);

 #ifdef FEAT_GUI_TABLINE
