开发者

Multiple Line continuation in VB.NET IDE (Visual Studio 2010)

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 ca开发者_StackOverflow中文版n 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.


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜