Hi Christian,

On 06/09/2011 02:21 PM, Christian Brabandt wrote:
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.


This works perfectly! It is indeed not possible to map <S-C-^> (gvim on ubuntu), so I used <M-6>. Thanks for the solution!

Jeroen



--
website: http://budts.be/ - twitter: @teranex
___________________________________
Registered Linux User #482240 - GetFirefox.com - ubuntu.com

--
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