如何防止自动缩进 [英] How to Prevent auto indenting
问题描述
这应该是一个简单的问题:
当我在网页表单中输入文字或粘贴文字时,例如:
< p> bla bla< / p>
如何让VS在第1列开始下一行?
换句话说,如果我输入如上所示的行并按"输入",我希望新行
从最左边开始,没有缩进,没有标签,没有任何内容。
我已经去了工具/选项/文本编辑器
并调整了标签选项,但这没有帮助。
嗨Coreysan,
欢迎来到MSDN论坛。
参考你的描述,我测试了这个行为在我的VS 2017/2015中,在Options-Text Editor-C#/ Basic-Tabs下找到选项"Indenting"用于C#或VB项目下的常见
文件,如xx.cs或xx.vb类文件。
对于Web表单,您需要转到Options-Text Editor-HTML(Web Forms)-Tabs并选择'None'作为选项"Indenting",如下面的屏幕截图,然后保存
测试网络表单,它按预期工作,开始一个没有任何空格的新行。
最好的问候,
萨拉跨度>
This should be a simple issue:
When I am typing text into a web form or pasting in text, like:
<p>bla bla</p>
How can I get VS to start the next line at column 1?
In other words, if I type a line like the above and press "enter", I would like the newline
to begin at the far left, no indents, no tabs, no nothing.
I've gone to tools/options/text editor
and tweaked the tabs option, but that doesn't help.
Hi Coreysan,
Welcome to the MSDN forum.
Refer to your description, I tested this behavior in my VS 2017/2015 and found the option "Indenting" under Options-Text Editor-C#/Basic-Tabs is used for the common files under the C# or VB project like xx.cs or xx.vb class file.
For the web form, you need go to Options-Text Editor-HTML (Web Forms)-Tabs and choose ‘None’ for the option "Indenting" like the following screenshot, then save it to test the web form, it works as your expected, start a new line without any spaces.
Best regards,
Sara
这篇关于如何防止自动缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!