VS 2010 编辑器行为

发布于 2024-08-15 08:24:31 字数 321 浏览 4 评论 0原文

使用 Visual Studio 2010 的 Beta 2。我使用 C# 并且始终启用虚拟空间。此版本与过去版本之间的一个显着区别是,当我位于 .cs 文件中的一行的开头并单击向左箭头时,光标会跳转到上面的行。以前版本的 Visual Studio 不会执行任何操作(即停留在行的开头)。直到现在我才意识到我有多么依赖它的工作。因为当它跳到上一行时,我按下了右箭头键,但处于虚拟模式下它使我保持在同一行。

我搜索了又搜索了一个可以改变这种行为的设置,并将我的 Visual Studio 2008 设置与 2010 进行了比较,但找不到神奇的开关。这是一个设置吗?如果是的话,它是什么?

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

苍暮颜 2024-08-22 08:24:31

从实现来看,当前的行为似乎是预期的,但很可能不是故意与 Orcas 不同。这可能只是在新编辑器中(重新)实现虚拟空间时的疏忽。

如果您想跟踪修复进度,可以在 Connect 上提交错误吗?我可以在内部提交一份文件,但您不会公开露面。另外,对于 Visual Studio 2010 RTM,该错误可能是“不会修复”(现在修复为时已晚),但该修复可能会进入 SP1。如果您没有提交 Connect bug,请告诉我,在这种情况下,我将提交一个内部 bug。

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.

七度光 2024-08-22 08:24:31

由于 VS2010 仍处于 Beta 阶段,因此很可能是一个错误。一个选项可能是导出 vs2008 设置并将其导入到 vs2010,以确保您拥有正确的设置(假设您没有更改任何特定于 vs 2010 的内容)。

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).

萌吟 2024-08-22 08:24:31

您是否尝试在 VS2010 中禁用虚拟空间?

虚拟空间在列选择模式下启用。当虚拟空间模式未启用时,插入点从一行的末尾直接移动到下一行的第一个字符。

此处的步骤

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

甲如呢乙后呢 2024-08-22 08:24:31

正如其他人所说,这可能是一个错误,或者是令人讨厌的故意行为改变。

但除此之外,我想说的是,自 VS2003 以来,每次升级时我都会重新评估 IDE(特别是按键绑定)的使用情况。

我发现标准 VS 行为是到达前一行末尾的非常有用的方法。如果我想到达该行的开头,我按 home (一次到达代码的开头,再一次到达该行的开头),所以我永远不会在代码的开头按左箭头除非我打算移到上一行的末尾。我个人觉得按左箭头却让它不做任何事情是非常令人恼火的——如果我按下了该键,我希望它能做一些有用的事情。

如果您花几天时间尝试一种新的导航方法,也许您会发现一种更简单、更有效的使用 IDE 的方法。你只需要忍受几天的小挫折,直到你可以重新编程你的肌肉记忆。从我的角度来看,它总是值得一试......(事实上,除了书签键从单击键更改为双击键之外,我从未发现对较新的键绑定集的更改根本是问题。如有必要,只需编辑按键绑定即可轻松修复该问题)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文