简体   繁体   English

Visual Studio 2008 HTML自动格式化程序

[英]Visual Studio 2008 HTML auto-formatter

Visual Studio 2008 "auto-formats" any block line elements such as div , h1 , etc. using a line break after the opening tag. Visual Studio 2008使用开头标记后的换行符“自动格式化”任何块行元素,如divh1等。

This has always bothered me when it comes to h1 , h2 etc. I pretty much always have them on a single line. 当涉及到h1h2等时,这一直困扰着我。我几乎总是把它们放在一条线上。 Is there any way to configure Visual Studio to keep these on one line? 有没有办法配置Visual Studio将这些保存在一行?

Ie this is what it does 也就是它的作用

<h1>
    This is a header</h1>

This is what I want: 这就是我要的:

<h1>This is a header</h1>

if you go into Tools | 如果你进入工具| Options | 选项| Text Editor | 文字编辑器| HTML | HTML | Format | 格式| Tag Specific Option then you will be able to set your own settings - rather than that i don't believe there is a simple way of controlling this 标签特定选项然后你将能够设置自己的设置 - 而不是我不相信有一个简单的方法来控制它

please correct me if i am wrong 如果我错了,请纠正我

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM