Change next/previous tab shortcuts?

16 views
Skip to first unread message

björn

unread,
Jun 20, 2009, 2:32:57 PM6/20/09
to vim_mac
Hi,

I noticed that the key equivalents for next/previous tab on the Window
menu in Safari now are Cmd-Tab and Cmd-Shift-Tab instead of Cmd-} and
Cmd-{ which are what MacVim uses (taken from Safari 3 on Tiger).
Would anybody object if I update the MacVim key equivalents to be the
same as Safari? (I noticed that Cmd-} and Cmd-{ still work in Safari
but the way it stands with MacVim I can only support one key
equivalent so I can't do the same thing.)

Björn

Nico Weber

unread,
Jun 21, 2009, 10:21:40 PM6/21/09
to vim...@googlegroups.com
Hi,

My vote: For me, ctrl-tab is awkward to type, and shift-ctrl-tab is
even worse. I'd stick with the current settings at least until Snow
Leopard comes out. If ctrl-tab is the new cross-app default in SL
(i.e. what's used in Safari _and_ Terminal.app :-P), I'm fine with
changing the shortcut, as it's then arguably the system default, but
for now, I wouldn't change it.

Nico

yann

unread,
Jun 25, 2009, 7:02:41 AM6/25/09
to vim_mac
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?

Yann

björn

unread,
Jun 25, 2009, 7:24:51 AM6/25/09
to vim...@googlegroups.com
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").

Björn

björn

unread,
Jun 25, 2009, 7:27:46 AM6/25/09
to vim...@googlegroups.com
2009/6/22 Nico Weber:

Agreed. I don't really want to change it myself since I am used to
<D-}>/<D-{>. I'll leave it the way it is for now.

Thanks for the feedback,
Björn

Niklas Lindström

unread,
Jun 25, 2009, 7:52:21 AM6/25/09
to vim...@googlegroups.com

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

yann

unread,
Jun 25, 2009, 4:02:51 PM6/25/09
to vim_mac
You guys rock!

I dunno how I managed to pass on searching for tabs in the help, but I
guess it's because I thought it was a macvim extension...

Anyway, thanks a lot!

On 25 juin, 13:52, Niklas Lindström <lindstr...@gmail.com> wrote:

Nico Weber

unread,
Jun 25, 2009, 10:40:07 PM6/25/09
to vim...@googlegroups.com
> I dunno how I managed to pass on searching for tabs in the help, but I
> guess it's because I thought it was a macvim extension...
>
> Anyway, thanks a lot!

All macvim extensions are documented in the help that comes with
MacVim, see `:h macvim` for the MacVim help page.

Nico

Reply all
Reply to author
Forward
0 new messages