I’ve posted about this issue before in previous versions of Visual Studio, which received a very helpful response. The newest version of Microsoft Visual Studio 2010 didn’t ship with emacs support. This was later remedied by Microsoft with an emulator. Great.
Don’t get me wrong; I’m very happy about the emacs support. I was happy enough, in fact, that I upgraded to the new Visual Studio. Even so, the emulator isn’t perfect. There are a lot of things broken. Notably, the expected behavior when pressing Enter or Tab.
Emacs doesn’t support auto-line indenting (at least out-of-the-box). Indenting happens depending on the language file loaded, any custom settings, etc. Microsoft emulated this behavior. When hitting Enter in VS2010, a newline appears and the cursor sits contently at the beginning of line point. I find this rather irritating!
To fix this, I had to settle on breaking a few other things (more on that later).
- Tools ->Options… -> Keyboard
- Under “Show commands containing:” type “EmacsBreakLineIndent”
- Click “Edit.EmacsBreakLineIndent”
- Select “Text Editor” under “Use new shortcut in:” (if not already selected)
- Highlight where it says “Press shortcut keys:”
- Press the Enter key on your keyboard
- Click “Assign” and “OK”
Done. That solves most formatting issues (in the code editor, there are issues editing HTML and Javascript).
Another annoyance is emacs keybindings with snippets. They don’t work. I haven’t figured this one out yet. If I do, I’ll be sure to post back.
Basically if you don’t already know, snippets are quick auto-fill type things that help compete common tasks. If you begin typing “for” and auto-complete shows a snippet icon, hit tab twice to see what it’s suppose to do. You can try it, at least, with default keybindings since it work work with emacs.
I’ll see if Microsoft Connect can shed some light on this issue and post back. (Vote here is you’re interested in getting this fixed.)
Thanks for the post–the newline problem has been driving me nuts!