How can I get Emacs style key bindings in Visual Studio? Is it available in Settings? Do I need a Plug-in?
10 Answers
You can try the Emacs keyboard scheme (Tools->Options->Environment->Keyboard)
-
2
-
It's available in the C# 2008 Express edition, at least as of 1 Mar 2010.– BryCoBatMar 1, 2010 at 16:24
-
8Seems like VS 2010 no longer supports Emacs key bindings: connect.microsoft.com/VisualStudio/feedback/details/465750/…– RayJun 8, 2010 at 21:18
-
12Now VS2010 does with an add-in: blogs.msdn.com/b/visualstudio/archive/2010/09/01/…– RaySep 13, 2010 at 5:07
-
Xkeymacs does a really good job of this. It is possible to configure this tool for every application running on your desktop.
-
1I used Xkeymacs for a few weeks, but found I was having weird problems with the keyboard commands being trapped. I stopped using Xkeymacs and the issues went away... It was great, while it lasted... Nov 17, 2010 at 17:01
-
Thanks for this suggestion. I was having the problem of my CTRL+v et al. being captured like @MichaelPaulukonis was. I fixed it by going into the Xkeymacs properties and setting the "default" to "Disable XKeymacs" and only enabling it for the applications I wanted (like visual studio, notepad, SAS, etc.). Additionally, if you just want copy-paste to work, you can uncheck the C-v keybinding and it will then pass that command through to the underlying app, which executes a paste. Sep 30, 2013 at 18:08
With Settings:
Try the Emacs keyboard scheme on Environment options.
Plugins:
I have only seen this one: VisEmacs, it will integrate Emacs as the default text editor for Visual Studio.
After posting that Emacs keybindings/emulation would no longer be available in Visual Studio 2010, Emacs Emulation is now available as a free extension for VS 2010.
For VS2019 it is an extension written by the community.
(Installing the extension)
- Open Visual Studio 2019
- Click Extensions -> Manage Extensions
- Select "Online" in the left-side panel.
- In the search box, enter "emacs"
- As of March 2020, "Emacs Emulation 2" seems to be the thing. Select it and click "Download"
- Close the window and close all open copies of Visual Studio. VSIX Installer will install the plug-in with your permission.
(Turning on EMACS)
- Open Visual Studio
- Use the menu Tools -> Customize. Click the "Keyboard" button at the bottom.
- In the box at the top there will be an EMACS scheme that wasn't there before. Pick it. Click OK.
- Close and reopen any code/text editing windows.
Press Ctrl-A, Ctrl-E, Ctrl-F.. It feels like a warm blanket on a cold day.
I use VisEmacs because the emacs keyboard scheme isn't quite as nice as emacs itself.
-
Does VisEmacs work with VS2010? It doesn't look like it's been updated in 4 years... Dec 16, 2011 at 1:40
Unfortunately, the Emacs emulation extension for VS 2010 is not officially supported for VS 2012.
However, a workaround is possible if follow the steps outlined in this answer for an SO question on getting Emacs key-bindings in VS2012
I used the Emacs keyboard scheme for a few days, but it quickly drove me crazy -- I couldn't rebind keys they way I was used to in Emacs (or couldn't find how to rebind quickly).
I should try XKeyMacs....
If you're using Visual Studio Express 2008 and want the Emacs key bindings then you need to install the Visual C++ edition of VSE 2008. Initially I only installed the C# edition and there were no custom key bindings in Tools->Options->Environment->Keyboard. Once I installed the C++ edition the Emacs key bindings became available in both products.
A quick Live search for "visual studio emacs" gave this page. I'm not sure how thorough it is though (having never used emacs myself).
-
1Please provide answers that involve personal experience with the suggested solution. Mar 20, 2020 at 17:00
-