Hi Jeroen!

On Do, 09 Jun 2011, Jeroen Budts wrote:

> Hi all,
> 
> I'm wondering if there is a shortcut in vim to switch between two
> tabs, similar to CTRL-^ to switch between two buffers.
> Suppose i'm working in tab 2 and i switch to tab 4 (4gt), then i'd
> like to be able to use a simple shortcut to switch back to the
> previous tab (S-CTRL-^ or something similar). Does something like
> that exist?

I don't think there is. You can however script yourself a solution:

au TabLeave * :let g:last_tab=tabpagenr()

fu! <sid>LastTab()
     if !exists("g:last_tab")
         return
     endif
     exe "tabn" g:last_tab
endfu

nmap <silent> <F7> :call <sid>LastTab()<cr>

I am not exactly sure, whether <S-C-^> can be mapped. That depends on 
your environment.

regards,
Christian

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to