views:

149

answers:

4

Using VisualStudio 2008, have emacs keyboard mapping scheme enabled.

If I select text and try to paste over it, it INSERTS the new text, rather than replacing it.

Also, if I select text and hit DELETE it deletes the first character AFTER the selected text (just as if I didn't have any text selected).

Does anyone know how to fix this so that I get the standard windows behavior. That is:

  1. If I select text and try to paste over it, it replaces the selected text with what I pasted in.

  2. If I select text and hit the DELETE key, it actually deletes the text I have selected

Thanks!

Abby

A: 

This is driving me crazy too! (I'm using VS 2005)

I fixed issue # 2 by adding a delete key shortcut to the Edit.EmacsDeleteSelection command, and another one for backspace-- so I can select something and hit backspace or delete to delete the selected text.

But I am stumped on issue #1. If I start typing over a selection or paste over a selection, it just inserts at the end.

FWIW, others have noticed the issue too, and reported it was filed and classified as a "Won't Fix" bug report. Oh! AbbyF, that must be you :)

Nathan
Crap! Normal delete and backspace are hosed now.
Nathan
hah, yeah, that was me. I have actually decided to give up and start learning the standard Visual Studio key shortcuts. I realized as annoying as this is after 15 years of coding with emacs keys (argh!), the emacs limitations (the ones I mentioned here plus other things like have you noticed auto indent doesn't work correctly in emacs mode?) were so constantly interrupting my flow while trying to code that they just weren't worth it. :-\ Sorry about the delete not working - that sounded so encouraging!!
Abby Fichtner
and, BTW, thanks for responding - I was starting to think I was the only Visual Studio user who used emacs keys (would explain why nothing works ;-) )
Abby Fichtner
grr... you might be right. I had decided maybe 2-3 years ago to standardize on emacs and bash editing shortcuts since I can use them on all the platforms I use every week.Have you tried at all to hack the most habitual emacs shortcuts into the VS theme instead? I tried that a bit but things like Alt-A kept bringing up Windows menus instead of beginning of line like I bound it.
Nathan
A: 

After doing a bit of searching on this, I started wondering how the real Emacs program works. Turns out, Emacs deletes at the carrot and not highlighted text when the delete key is pressed, and it pastes next to and not over highlighted text as well. So I don't understand why people would call this a bug. Microsoft actually properly emulated Emacs, it's just not to some people's liking...

Seth
A: 

That is the behavior of emacs. However one of the most common bits in people's emacs initialization if they are Windows users is to alter this behavior to match other editors. Since emacs main purpose is to be configurable, making an emacs emulation that isn't configurable in this way is like preserving the bathwater and throwing out the baby.

JMM