停止从格式化code视觉工作室 [英] stop visual studio from formatting code

查看:191
本文介绍了停止从格式化code视觉工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从格式化code停止的Visual Studio 2013

How do you stop visual studio 2013 from formatting code

Visual Studio是一个HTML文件,它打破它在我的内联样式冒号后插入空格。

visual studio is inserting spaces after colons in my inline styles in a html file, which breaks it.

<div style=float:left;width:150>

它把空间冒号后
    

It puts spaces after the colons

我知道我可以把风格报价,或使用样式表,但我不想。

I know I could put the style in quotes, or use a stylesheet, but I don't want to.

是否有可能与您的code搞乱停止VS?

Is it possible to stop VS from messing with your code?

推荐答案

工具&gt;选项​​&gt;文本编辑器&GT; HTML(Web窗体)GT;格式化和配置所需的格式选项。

Go to Tools > Options > Text Editor > HTML (Web Forms) > Formatting and configure the formatting options you want.

另外,请记住,你的code是没有实际有效的HTML,属性值应被包裹在引号。这就是为什么它与你的空间搞乱。

Also, keep in mind that your "code" isn't actually valid html, attribute values should be wrapped in quotes. That's why it's messing with your spaces.

<div style="float:left;width:150">

这篇关于停止从格式化code视觉工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆