Loading ...
Sorry, an error occurred while loading the content.

87950Re: Alternate Tab

Expand Messages
  • Sadarax
    Mar 3, 2008
      I do not know of anything different than the keys you have mentioned.

      But you can always map different keys to these functions. Here are some of my mappings from my .vimrc file:

      " Make a new tap with CTRL+t
      :nmap <C-t> :tabnew<cr>
      :imap <C-t> <ESC>:tabnew<cr>

      " Go to the next tab with a key press while in navigation mode
      :nmap <tab> :tabnext<cr>

      " Go to previous tab with Shift+h and next tab with Shift+l in navigation mode
      :nmap <S-h> gT
      :nmap <S-l> gt

      " Move to next tab while within insert mode
      :imap <C-E> <ESC>:tabnext<cr>a

      And those this is not related to what you want, I often use this to spawn a new tab (or Explorer window).

      " Run Explorer in a new Tab
      imap <F1> <Esc>:call RunExplorer() <CR>
      cmap <F1> :call RunExplorer() <CR>
      nmap <silent> <F1> :call RunExplorer() <CR>
      function! RunExplorer()
        if expand("%") != ""
          tabnew
        endif
        Explore
      endfunction

      I hope that helps.

      On Sun, Mar 2, 2008 at 9:32 PM, Jeenu <jeenuv@...> wrote:

      Hi,

      I wonder whether there is a command which would open alternate tab,
      similar to CTRL-^ for alternate buffer. This would be particularly
      useful when working with 2 tabs most of the time. It's a bit painful
      to use multiple 'gt' and 'gT', unless they are placed next to each
      other using ':tabm'

      Thanks
      Jeenu




      --
      How sad it would be to live a life less wonderful, if only because one were afraid of a little hard work. If you shy away from challenges, you shy away from some of the greatest achievements in life.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

    • Show all 5 messages in this topic