Visual Studio 2008 used to have a Emacs key mapping scheme that you could pick from the Options dialog under the Keyboard options. Visual Studio 2010 did away with that key mapping scheme.
But those emacs enthusiasts among us who use Visual Studio should not fear... There is now an Emacs Emulation extension available for VS2010 that you can install via the Extensions Manager under the Tools menu.
To install the Emacs Emulation extension, follow these steps:
- Open Visual Studio 2010
- Go to the Tools menu
- Select the Extension Manager
- On the Extension Manager dialog, select Online Gallery
- Search the Online Gallery for Emacs (top right)
- Select and install the Emacs Emulation package
- Restart Visual Studio 2010
- From the Options dialog, the Emacs key mapping scheme is now available
Beyond the default Emacs key bindings, the ones that I find most useful are the following:
- ALT + X - Places the cursor in the Find/Command box on the Standard toolbar.
- SHIFT + ALT + 5 - Displays the replace options in the Quick tab of the Find and Replace dialog box.
- CTRL + X, CTRL + X - Moves the cursor to the current mark in the location stack and moves the current mark to the location where the cursor mark was when the command was invoked.
- CTRL + X, 1 - When a window is split, this shortcut closes the pane that does not have focus.
- CTRL + X, 2 - Splits the current document in half vertically. The current line of code is centered in each window.
... and that's all, folks!