In Vim, is there a way to quickly toggle between the current tab and the last active tab? Sort of the way '' toggles between the current line and the last active line. Plugins / keyboard mappings / voodoo all acceptable.
+1
A:
Put this in your .vimrc:
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
Then, in normal mode, type \tl
to swap to the tab you viewed last.
Lucas Oman
2010-01-22 20:10:34
that is awesome, thanks so much
Paul
2010-01-23 04:27:47
A:
I use buffers and not tabs, but I am able to switch between the current and latest used buffer using :b#
Basics of using buffers are:
:e filename to open file in new buffer
:bn to go to next buffer
:bp to go to previous buffer
:bd to close current buffer
Pierre
2010-01-22 22:34:21