VB.NET IDE 中的多行延续 (Visual Studio 2010)

发布于 2024-09-25 09:08:46 字数 279 浏览 0 评论 0原文

我注意到,当我开始下一行代码并按 Enter 键时,它会重新压缩自身,并且续行会向左移动一点...然后,如果我将焦点放在第二行上并再次按 Enter 键,它(第二行)会移动再向左一些,每次我关注第二行并按 Enter 时,它都会继续这样做。这正如你想象的那样,真的很烦人!

我怎样才能使我的第二行(和第三行等)以预先确定的方式格式化,以便它们始终是从我的第1行开始处向右缩进一定数量的制表符?

谢谢

ps:我不知道为什么 VS 总是对此感到奇怪,如果你问我特别是作为默认行为,它的设计真的很糟糕。

i notice that when i start next line of code and i press enter, it recompacts itself and the continued line moves left a bit... then if i place focus on the second line and press enter again, it (the second line) moves to the left some more, and it keeps doing this every time i focus on second line and press enter. this is as you can imagine, really annoying!!

how can i make it so that my second (and third etc) lines are formatted in a pre-determined way so they are always a certain amount of tabs indented to the right from where my line 1 starts??

thanks

ps: i have no idea why VS has always been weird with this, its really bad design if you ask me especially as default behaviour.

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

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

发布评论

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

评论(3

给不了的爱 2024-10-02 09:08:46

我在VS2010中有一段时间遇到这个问题。如果您使用制表符缩进,这似乎只是一个问题 - 我通过将缩进选项更改为空格而不是制表符来修复它。

Tools > Options > Text Editor > Basic > Tabs :

* Indenting: Smart
* Insert Spaces

I had this problem for a while in VS2010. It seems to only be a problem if you are using Tab indenting - I fixed it by changing my indenting option to Spaces rather than Tabs.

Tools > Options > Text Editor > Basic > Tabs :

* Indenting: Smart
* Insert Spaces
丢了幸福的猪 2024-10-02 09:08:46

尝试 IDE 编辑器格式设置。或 Ctrl+K, D 快速格式化。

Try IDE Editor Format settings. Or Ctrl+K, D quick formatting.

两相知 2024-10-02 09:08:46

转到工具 ->选项->文本编辑器 -> [语言]->制表符,您可以根据需要设置缩进选项。欲了解更多信息,我在这里有一篇文章可能会有所帮助:
http:// /blogs.msdn.com/b/zainnab/archive/2010/09/08/insert-spaces-vs-keep-tabs-vstipedit0072.aspx

Go to Tools -> Options -> Text Editor -> [Language] -> Tabs and you can set up your indenting options as needed. For more information I have a post here that may help:
http://blogs.msdn.com/b/zainnab/archive/2010/09/08/insert-spaces-vs-keep-tabs-vstipedit0072.aspx

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