Many people probably never use the “Services” item that appears on the application menu in every Mac OS X application. At least I never used to, and for two reasons: I didn’t even know it existed for a long time and then when I did learn about it I could never be bothered navigating through all those submenus. I’ve since found a good way to actually use the Services menu, namely via Mac OS X’s ability to customize keyboard shortcuts for any menu item in any application.
Consider the MacVim service “Open Document Containing Selection” (phew). With it you can select some text in (almost) any application, run the service and a new MacVim window will open up with the selected text. Using the Services menu to do this would take a lot more time then to simply ⌘C, switch to MacVim, ⌘N, then ⌘V but by assigning your own keyboard shortcut to this service it actually becomes useful.
Here’s how to assign ⌃⌥⌘V to this service (yes, that’s a lot of keys, but at least it’s unlikely to be assigned to some other menu and it is not too awkward to type):
- Click the Apple Menu
- Choose “System Preferences…”
- Click “Keyboard & Mouse”
- Click the “Keyboard Shortcuts” tab
- Click “+” button in the bottom left corner
- In the sheet that pops down, choose “All Applications” from the drop down menu
- In the text box next to “Menu Title” enter “New Document Containing Selection” (double-check for typos or the shortcut won’t work)
- Click the edit box next to “Keyboard Shortcut” and hold down Control, Option, Command and v at the same time, then click the “Add” button
Now try it out! For example open Safari, select some text, and hit ⌃⌥⌘V. If it does not work then you have most likely misspelled the menu item in step 7, or you have chosen a shortcut that is already in use (⌃⌥⌘V worked in Safari for me). Finding a shortcut that works across all applications can be kind of frustrating and sometimes you have to restart an application before it will notice a change to the shortcut.
Another tip is to assign a shortcut to the “New Document Here” service for Finder only (choose “Finder” instead of “All Applications” from the drop down menu in step 6 and enter “New Document Here” in step 7). Using that shortcut will open a new MacVim window and the current directory will be set to whatever folder you are currently browsing in the Finder. I often use this to create a new document on the Desktop by clicking the Desktop, hitting the shortcut, enter some text, then hit ⌘S and enter a file name. Give it a try.