Mapping +T?

15 views
Skip to first unread message

703designs

unread,
Oct 16, 2008, 6:09:38 PM10/16/08
to vim_mac
I always use :tabnew for tabs, and I don't get anything out of the +T
(new tab) command. Right now, I have <C-T> mapped to a function, but
of course it feels awkward on my Mac. How can I remap +T?

David Zhou

unread,
Oct 16, 2008, 6:21:40 PM10/16/08
to vim...@googlegroups.com

Isn't Apple-T already the shortcut for creating new tabs in MacVim by
default?

---
David Zhou
da...@nodnod.net


703designs

unread,
Oct 16, 2008, 6:28:36 PM10/16/08
to vim_mac
Yep, I want to remove or override that binding. If you haven't guessed
yet, this is for FuzzyFinder (TextMate muscle memory).

Thomas

Robin

unread,
Oct 16, 2008, 6:33:27 PM10/16/08
to vim...@googlegroups.com

You could try <D-T>. I don't know if there is something special about
the existing tab mapping, but I use <D-...> for mapping many other
things like <D-1>, <D-2> for tab shortcuts.

Ben Schmidt

unread,
Oct 16, 2008, 6:55:35 PM10/16/08
to vim...@googlegroups.com
703designs wrote:
> Yep, I want to remove or override that binding. If you haven't guessed
> yet, this is for FuzzyFinder (TextMate muscle memory).

macmenu &File.New\ Tab key=<nop>
nnoremap <D-t> whatever you want...

It must be in your vimrc or gvimrc as the unbinding will only work if it
happens at startup time for a Vim instance. The :menu command without
parameters is helpful to find the exact text to use to unbind menu item
keys, e.g. I need

macmenu &File.Open\ Tab\.\.\.<Tab>:tabnew key=<nop>
nnoremap <D-T> something

to change the meaning of apple-shift-T, but there was no way I could
figure that out just by looking at the menu.

:help :macmenu
:help <D-
:help showing-menus

Ben.

703designs

unread,
Oct 16, 2008, 7:43:23 PM10/16/08
to vim_mac
I must be missing something; this doesn't work:

" Unmap Apple+T
macmenu &File.New\ Tab key=<nop>
" FuzzyFinder
nnoremap <D-T> :FuzzyFinderFile<CR>

Jason Foreman

unread,
Oct 16, 2008, 9:43:42 PM10/16/08
to vim...@googlegroups.com
On Oct 16, 2008, at 6:43 PM, 703designs wrote:
>
> I must be missing something; this doesn't work:
>
> " Unmap Apple+T
> macmenu &File.New\ Tab key=<nop>
> " FuzzyFinder
> nnoremap <D-T> :FuzzyFinderFile<CR>

This *must* go in .gvimrc, not .vimrc, otherwise the "macmenu" command
will be overridden by the one that sets up the default menus.

You could also just symlink .gvimrc to .vimrc and include these in an
"if has('gui_running')" section. I'm not sure if that's advisable
though.

Hope that helps!

Jason


Ben Schmidt

unread,
Oct 16, 2008, 11:57:58 PM10/16/08
to vim...@googlegroups.com
703designs wrote:
> I must be missing something; this doesn't work:
>
> " Unmap Apple+T
> macmenu &File.New\ Tab key=<nop>
> " FuzzyFinder
> nnoremap <D-T> :FuzzyFinderFile<CR>

You want a little t, not a big T. What you have in your map is command+shift+T.

Ben.

703designs

unread,
Oct 17, 2008, 12:22:02 PM10/17/08
to vim_mac
Thanks for all the help! I have a very organized Vim configuration
(mappings in .vim/scripts/conf/mappings.vim, etc.) so I wasn't putting
this in the .gvimrc. And with that, my biggest reason for using
TextMate has vanished.

On Oct 16, 11:57 pm, Ben Schmidt <mail_ben_schm...@yahoo.com.au>
wrote:
Reply all
Reply to author
Forward
0 new messages