views:

259

answers:

4

Using Beta 2 of Visual Studio 2010. I'm using C# and have always enabled Virtual Space. A notable difference in this version between past versions is that when I'm at the beginning of a line in the .cs file and I hit the left arrow, the cursor jumps to the line above. Previous versions of Visual Studio would perform no action (i.e. stay at the beginning of the line). I never realized how much I depended on that working as it did until now. Because when it jumps to the previous line, I hit the right arrow key, but being in virtual mode it keeps me on the same line.

I searched and searched for a setting that changes this behavior and compared my Visual Studio 2008 settings to 2010 and couldn't find the magic switch. Is this a setting and if so, what is it?

Thank you.

A: 

Are you trying to disable Virtual Space in VS2010?

Virtual Space is enabled in Column Selection mode. When Virtual Space mode is not enabled, the insertion point moves from the end of one line directly to the first character of the next.

Steps here

keyboardP
Well, this is the first time I've ever answers a 'bounty' question, so I didn't know it worked in a different way. If there's no right answer, I thought no one got any rep - similar to normal questions. Maybe you could clarify for me what is required. From what I read, the insertion point wasn't moving to the next line, hence I posted a link fixing that.
keyboardP
@Andreas Bonini - Koper - You've deleted your comment. Could you please clarify the downvote. Thanks.
keyboardP
I want the same behavior that is in Visual Studio 2008 when virtual mode is enabled. If the cursor is at the far left, a left arrow will not bump it up to the previous line. The link you sent told me what virtual space is, which I already knew. This setting has no effect on the behavior I'm speaking of.
billb
Ah okay, I understand what you mean now.
keyboardP
Since VS2010 is still Beta, it may well be a bug. An option could be to export vs2008 settings and import them to vs2010 to ensure you have the correct settings (assuming you haven't changed anything specific to vs 2010).
keyboardP
Good suggestion! However, it did not work, so I suspect that it's a functionality change (intended or unintended). Supposedly the editor was completely rewritten, so this could very well be how it's going to behave moving forward. I sure hope not :(
billb
Do me a favor and add your import/export comment as a response. I'll mark it up and accept it. I'm almost convinced there is not a solution here.
billb
Will do, thanks. It does feel like a bug as it doesn't seem to be an improvement on the old method. Hopefully once it comes out of beta, this problem is solved, either by fixing the bug or identifying it as intentional.
keyboardP
+1  A: 

Since VS2010 is still Beta, it may well be a bug. An option could be to export vs2008 settings and import them to vs2010 to ensure you have the correct settings (assuming you haven't changed anything specific to vs 2010).

keyboardP
Good suggestion! However, it did not work, so I suspect that it's a functionality change (intended or unintended). Supposedly the editor was completely rewritten, so this could very well be how it's going to behave moving forward. I sure hope not :(
billb
A: 

As the others said, it could be a bug, or an annoying intentional change of behaviour.

But to add to this, I'd say that since VS2003 I have always re-evaluated my use of the IDE (and specifically the key bindings) every time I upgrade.

I find the standard VS behaviour an extremely useful way of getting to the end of the preceeding line. If I want to get to the beginning of the line, I press home (once to get to the start of the code, and again to get to the start of the line), so I never press left-arrow at the start of the line unless I intend to move to the end of the previous line. I would personally find it utterly irritating to press left arrow and have it not do anything - if I've pressed the key I expect it to do something useful.

Perhaps if you spend a few days trialling a new navigation approach, you will discover an easier, more efficient way of using the IDE. You just have to put up with a few days of minor frustration until you can reprogram your muscle-memory. From my point of view, it's always worth a try... (Indeed I've never found a change to a newer key binding set to be a problem at all, apart from the bookmark keys changing from a single keystroke to a double-keystroke. ANd that is easily fixed if necessary by just editing the key bindings)

Jason Williams
+2  A: 

Looking at the implementation, it appears the current behavior is expected, but is likely not intentionally different than Orcas. It was probably just an oversight when virtual space was (re)implemented in the new editor.

If you want to track the progress of the fix, can you file a bug on Connect? I can file one internally, but you won't be publicly visible. Also, the bug will probably be "Won't Fixed" for Visual Studio 2010 RTM (it's too late to fix now), but the fix could make it into SP1. Please let me know if you don't file a Connect bug, in which case I will file an internal one.

Noah Richards