Does anybody know whether it is possible to write a plugin for visual studio 2010 to implement a different key mapping (emacs in particular) for the C# editor? Are there any examples?
EDIT: Lo and behold, Microsoft has just announced an Emacs emulation extension for VS2010 http://blogs.msdn.com/b/visualstudio/archive/2010/09/01/emacs-emulation-extension-now-available.aspx..
It's definitely possible, although I've only heard about Vim implementations as mentioned in this thread: http://stackoverflow.com/questions/1141992/any-free-vim-add-in-for-visual-studio..
It sounds like you're trying to add an emacs emulation mode to Visual Studio. If so that's certainly possible although it does require a considerable amount of work to be done.
It's hard to describe everything in a simple SO question. However there is a large open source Vim emulation mode available on github you can use as a starting point for understanding the work that needs to go into this
You might check out XKeyMacs as a more general solution (in terms of what programs it works with) to getting an Emacs interface:
http://www.cam.hi-ho.ne.jp/oishi/indexen.html
I've got this setup to work on VS6, VS.NET, VS2005, VS2008, and VS2010. It also works for pretty much anything that uses "standard" Microsoft keystrokes. You can even apply it to Internet and File Explorer, Firefox, Eclipse, CVI, etc.
It is, however, only for getting an Emacs interface, not a general purpose keyboard remapper.
There is now a plugin by Microsoft to give Emacs keys to VS2010:
http://visualstudiogallery.msdn.microsoft.com/en-us/09dc58c4-6f47-413a-9176-742be7463f92
Of course, this won't work with the Express versions as they don't handle plugins.