The official source of product insight from the Visual Studio Engineering Team
We are pleased to announce the availability of Emacs Emulation as a free extension for Visual Studio 2010! This extension provides basic support for Emacs keybindings and text editing commands, very similar to the built-in Emacs keyboard layout in VS 2008. Once the extension is installed you should be able to use familiar keyboard shortcuts to execute Emacs commands within VS 2010.
Installing Emacs Emulation requires Visual Studio 2010 Pro, Premium, or Ultimate (the Express editions do not support extensions) and a one-time elevation to administrator permissions. This elevation is necessary to install the keybindings file in the Visual Studio Program Folder. The first time you launch Visual Studio after downloading and installing the extension, you should see a permissions dialog, shown below. Click OK and follow the system prompt to elevate. This is only required once; subsequent launches of Visual Studio will not prompt for elevation.
After installing the extension and keybindings file, go to Tools->Options->Keyboard to select the Emacs keyboard mapping scheme, as shown below:
You can begin using Emacs shortcuts as soon as you’ve selected Emacs as your keyboard mapping scheme. Some of the most common Emacs shortcuts supported by this extension are:
General Shortcut Keys
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.
ALT + Y
Pastes an item from the Clipboard Ring tab of the Toolbox to the file and automatically selects the pasted item. Press ALT + Y again to paste the next item to the Clipboard Ring.
CTRL + G
Stops the current command or code and deactivates the region.
CTRL + U
Prompts for an integer, returns negative if the first character entered is a hyphen. When a non-digit character is entered, the prefix for the command is set to the entered integer. If no integer is entered, the default value is 4. Repeatedly invoking the command multiplies the current value entered by the previous accumulated value.
Inserts a new line.
CTRL + J
Inserts a new line and indents it.
CTRL + T
Transposes the characters on either side of the cursor. For example, Ed|n Sub would be changed to read End| Sub.
CTRL + DELETE
Deletes the current selection.
CTRL + K
Deletes from the cursor to the end of the current line.
CTRL + O
Inserts a new line after the cursor. The cursor stays in the current line.
CTRL + Q
Reads another key and inserts the key into the buffer. Keys must be 8-bit ASCII characters. Use this command to insert control characters, meta characters, or graphics characters into the buffer.
ALT + C
Capitalizes the character to the right of the cursor or the first character of the next word if the cursor is between words.
ALT + D
Deletes the characters to the right of the cursor to the end of the word.
ALT + BACKSPACE —or— ALT + DELETE
Deletes the characters from the left of the cursor to the start of the word.
ALT + L
Changes the selected text to lowercase characters.
ALT + T
Transposes the words on either side of the cursor. For example, |End Sub would be changed to read Sub End|.
ALT + U
Changes the selected text to uppercase characters.
CTRL + B
Moves the cursor one character to the left.
CTRL + F
Moves the cursor one character to the right.
END —or— SHIFT + ALT + . (period) —or— SHIFT + END —or— CTRL + X, ]
Moves the cursor to the bottom of the current document.
HOME —or— SHIFT + ALT + , (comma) —or— SHIFT + HOME —or— CTRL + X, [
Moves the cursor to the top of the current document.
ALT + G
Displays the Go To Line dialog box, which allows you to navigate to a specific line of code in the current document.
CTRL + N
Moves the cursor down one line.
CTRL + E
Moves the cursor to the end of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, end of the current line.
CTRL + A
Moves the cursor to the beginning of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, beginning of the current line.
CTRL + P
Moves the cursor up one line.
CTRL + X, CTRL + SPACEBAR —or— CTRL + X, CTRL + SHIFT + 2
Moves the cursor to the current mark and then removes the mark for the location stack.
CTRL + L
Scrolls the document so that the current line is now in the center of the viewable area in the editor.
SHIFT + ALT + 1
Scrolls the document so that the current line appears at the top of the viewable area in the editor.
CTRL + V
Scrolls down within the document.
ALT + V
Scrolls up within the document.
CTRL + SHIFT + 2 —or— CTRL + SPACEBAR
Adds a mark to the location stack for the current cursor.
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 + RIGHT ARROW —or— ALT + F —or— ALT + RIGHT ARROW
Moves the cursor to the first character in the next word.
CTRL + LEFT ARROW —or— ALT + B —or— ALT + LEFT ARROW
Moves the cursor to the first character in the previous word.
CTRL + X, S
Displays a list of modified files and allows you to select which files to save.
CTRL + X, 1
When a window is split, this shortcut closes the pane that does not have focus.
CTRL + X, O
Switches focus between panes when a window is split.
CTRL + X, 2
Splits the current document in half vertically. The current line of code is centered in each window.
Once you’ve installed the Emacs Emulations extension, all of the Emacs shortcuts it enables are fully customizable. If you choose to use the Emacs keyboard schema, you’ll automatically get the shortcuts listed above. If you don’t like a particular keybinding in the Emacs schema, you can always change it through Tools->Options->Keyboard. You can switch keyboard layouts or customize shortcuts for specific commands (Emacs or otherwise) at any time.
We’re always interested in your feedback on Visual Studio and extensions published by Microsoft. In fact, this extension was created largely in response to your feedback that removing Emacs emulation from VS 2010 was causing significant pain on a daily basis; we hope we’ve addressed that pain with this extension. If you have questions or comments about Emacs Emulation, feel free to post them in the blog comments here. If you find a specific bug in the Emacs Emulation extension, please file a Connect bug report so we can investigate in more detail.
Brittany Behrens Program Manager, Visual Studio Editor
Please add brief emulation. I beg you. Please
Let me add another request for Brief emulation. As many have mentioned, those of us who use the Brief emulation are precisely those who worked in the industry for many years and are the ones who can recommend that a particular piece of software be used or not. At the moment, VS 2010 is on the Do Not Approve list. Please reconsider adding Brief keyboard emulation back into the program.
I had a lot of custom keybindings in VS 2008 that I'd like to export (and then import them into VS 2010). Example: CTRL-S for Edit.Find, in text mode. Is there a way to do this - having to re-enter all my custom bindings each time I upgrade VS is a nuisance. Plus: if the exported file were readable text, I could easily find all the commands I've defined, which would be independently useful.
@Chris: The wizard at Tools->Import and Export Settings should be able to do this for you. You can export from VS 2008, save that file somewhere, and then import in VS 2010 to get your custom keybindings in the upgraded version.
The absence of Brief emulation in Visual Studio 2010 may mean that our group just stays on Visual Studio 2008. That's a shame.
fucking crazy behavior of HOME and END key in text editor.
why do they navigate to the start/end of the document but not the line.
Brittany, any news on resolving the tab-overwrite bug?
This is yet another request for the tab-overwrite bug.
Please, please, please give me Brief keyboard emulation!!!!
I see discussion has quieted down quite a lot, but I'll ask this question: is there any way to bind c-x b to toggle between notebook tabs in the editor? I must use that combination 10,000 times a day to switch back and forth between buffers.
How about support for Visual Studio 11 - please!!
Please reconsider adding Brief emulation. It's far better than all others
The permission dialog never appeared and Emacs isn't in my keyboard bindings select list. I have VS 2010 with SP1. Any ideas?
I also wish there was a Brief emulation.
It is very very productive and any other key mapping feels so slow in comparison (+ to copy, - to cut, Ins to paste, etc).
I cannot understand why it is so difficult to provide different keymapping choices - it's not rocket-science surely and should be a (relatively) simple matter.
Borland managed it fine - so what's the problem?
When this is the attitude - it explains where the problem lies: