Disabling/changing cmd-P

54 views
Skip to first unread message

Tim Johnson

unread,
Aug 22, 2012, 3:34:16 PM8/22/12
to macvim ML
I've recently started using vim on Mac OSX lion.
I really don't like the cmd-P mapping to start a print job, because
I use cmd-[ for application switch and being a bit of a clutz I
annoy myself by hitting the 'p' instead.

1)How can I disable cmd-P ?
2)If cmd-P is system-wide, I can live with disabling it system-wide,
but I have not been able to find that control in the System
Preferences Window. I have looked under Keyboard->Keyboard
Shortcuts, but have found nothing.

TIA
tj
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

björn

unread,
Aug 23, 2012, 7:43:54 AM8/23/12
to vim...@googlegroups.com
> I've recently started using vim on Mac OSX lion.
> I really don't like the cmd-P mapping to start a print job, because
> I use cmd-[ for application switch and being a bit of a clutz I
> annoy myself by hitting the 'p' instead.
>
> 1)How can I disable cmd-P ?

Try adding the following line to your ~/.gvimrc file (create it if it
doesn't already exists):

macmenu File.Print key=<nop>

For more information see ":h :macmenu" and ":h cmd-key".

Björn

Tim Johnson

unread,
Aug 23, 2012, 11:28:39 AM8/23/12
to vim...@googlegroups.com
* bj�rn <bjorn.w...@gmail.com> [120823 07:11]:
Thanks for the reply Bjorn, unfortunately, that has no effect.
What's more the examples from gui_mac.txt using <nop> that I have
tried have no effect either. This may be because of some other
configuration? But I wouldn't know what that would be.

Tim Johnson

unread,
Aug 23, 2012, 11:38:00 AM8/23/12
to vim...@googlegroups.com
* bj�rn <bjorn.w...@gmail.com> [120823 07:11]:
[blush] Amending the previous .... I haven't had all of my coffee
yet. I had placed those instructions in .gvimrc and sourced and
also executed those instructions from ex to no avail, but when I
shut gvim down entirely and restarted - the menu action is now
disabled. Great!

However, now cmd-p is is paste (as in p), can I disable that?
thanks (more coffee and reading more)

Tim Johnson

unread,
Aug 23, 2012, 11:51:01 AM8/23/12
to vim...@googlegroups.com
* Tim Johnson <t...@akwebsoft.com> [120823 07:38]:
>
> However, now cmd-p is is paste (as in p), can I disable that?
> thanks (more coffee and reading more)
" Looks like the complete recipe is:
macmenu File.Print key=<nop>
map <D-p> <nop>

Thanks again, bjorn.
Reply all
Reply to author
Forward
0 new messages