From 73626de24f2ba43aba9b77ff48880de26b68f6ce Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Fri, 15 Oct 2010 15:34:54 +0200 Subject: [PATCH] Update help on binding to Cmd-key --- runtime/doc/gui_mac.txt | 20 +++++++++++++++++++- runtime/doc/tags | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/runtime/doc/gui_mac.txt b/runtime/doc/gui_mac.txt index 3cff580265..8076c2643b 100644 --- a/runtime/doc/gui_mac.txt +++ b/runtime/doc/gui_mac.txt @@ -172,6 +172,8 @@ time you start MacVim, you could create an alias such as > alias gvim='/Applications/MacVim.app/Contents/MacOS/Vim -g' and add that to "~/.profile". +Note: Do NOT call the MacVim binary inside the app bundle to start MacVim. + *mvim* A more flexible way to start MacVim is to use the shell script "mvim" which comes bundled with MacVim. Put this script in a folder in your path and then @@ -549,7 +551,8 @@ Note that url has to be a file:// url pointing to an existing local file. Most keyboard shortcuts in MacVim are bound to menu items and can be discovered by looking through the menus (see |macvim-menus| on how to create -your own menu shortcuts). The remaining shortcuts are listed here: +your own menu shortcuts, see |cmd-key| on how to map your own commands to +Cmd-key shortcuts). The remaining shortcuts are listed here: *Cmd-.* ** Cmd-. Interrupt Vim. Unlike Ctrl-C which is sent as normal @@ -608,6 +611,21 @@ equivalents which are not set up with :map). See |macvim-shift-movement| if you want Shift to select text when used in conjunction with the above Cmd/Alt movement shortcuts. + *cmd-key* *cmd-shortcuts* +Creating key mappings that involve the Cmd key ( in Vim notation) can +sometimes be slightly involved. Here are all the things you need to consider: + +- Make sure the shortcut is not used by a menu item by looking through the + menus. If it is then you need to unbind it before you can map to it. This + is described under the help for the |:macmenu| command. +- Bindings to are case sensitive: is not the same as . If + you want to map something to Cmd+Shift+d, then you need to use , not + or . +- Some command key shortcuts are reserved by Mac OS X and cannot be mapped to + (e.g. ). However, some of these shortcuts can be freed up in the + System Preferences under Keyboard (e.g. Cmd+Space). +- A few command key mappings are set up by MacVim, see |cmd-movement|. + ============================================================================== 11. Trackpad gestures *macvim-gestures* diff --git a/runtime/doc/tags b/runtime/doc/tags index b4284d3210..0e9aeb3160 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4987,7 +4987,9 @@ clearmatches() eval.txt /*clearmatches()* client-server remote.txt /*client-server* clientserver remote.txt /*clientserver* clipboard gui.txt /*clipboard* +cmd-key gui_mac.txt /*cmd-key* cmd-movement gui_mac.txt /*cmd-movement* +cmd-shortcuts gui_mac.txt /*cmd-shortcuts* cmdarg-variable eval.txt /*cmdarg-variable* cmdbang-variable eval.txt /*cmdbang-variable* cmdline-arguments vi_diff.txt /*cmdline-arguments*