On Thu, Jun 25, 2009 at 1:24 PM, björn<[email protected]> wrote:
>
> 2009/6/25 yann:
>>
>> In the mising shortcut department, I'd love to be able to go directly
>> to a specific tab by using cmd-1 to cmd-9 for the first 9 tabs. I
>> searched the doc but didn't find a command I could bind to, in order
>> to achieve this. Did I miss something or does this fall in the
>> enhancement category?
>
> Something like
>
> :nmap <D-1> :tabn 1<CR>
> :nmap <D-2> :tabn 2<CR>
> :nmap <D-3> :tabn 3<CR>
> ...
>
> should do the trick (you may also want to make the mapping in insert
> mode, see ":h map-modes").

You can also use the normal mode command <tabnumber>gt (e.g. 1gt, 2gt
etc.) to switch tabs. Thus shortening the mappings a tiny bit:

    :nmap <D-1> 1gt
    ...

Or add this to your .gvimrc:

        for i in range(1, 9)
            exec "nnoremap <D-".i."> ".i."gt"
        endfor

;)

Best regards,
Niklas

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to