http://blogs.msdn.com/b/webdev/archive/2013/03/04/disabling-knockout-intellisense.aspx

我升级了一下VS2012,项目中用到的knockoutjs,点击格式化就是(Ctrl+ED)的时候,文档将会被格式化,这个Knockoutjs的格式化 让我程序产生了问题,比如我的空格是 一个空格 <span data-bind="text:'@hello'+' world',它格式化后,把我变成多个空格<span data-bind="text:'@hello'+'    world',因此必须禁用它的格式化,以下可以禁止它

  1. Create a file named TurnKoOff.txt and paste the following text into the file:
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\HTML Editor]
    "KnockoutSupportEnabled"="0"

  2. Change the extensions of both files from “.txt” to “.reg.”.
  3. Ensure that Visual Studio (or Express for Web) is not running.
  4. Double-click TurnKoOff.reg.  You will receive the warning:
    ”Adding
    information can unintentionally change or delete values and cause
    components to stop working correctly. If you do not trust the source of
    this information in TurnKoOff.reg, do not add it to the registry.”
  5. After exercising all appropriate caution, click “Yes”.
  6. Restart Visual Studio or Express for Web.

Knockout Intellisense will now be completely disabled.  It can be turned back on by double-clicking the TurnKoOn.reg file.

重新打开:

Create another file named TurnKoOn.txt and paste the following text in:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\HTML Editor]
"KnockoutSupportEnabled"=-
NOTE:
If you are running Visual Studio 2012 Express for Web rather than
Visual Studio 2012 Professional, Premium or Ultimate, substitute
“\VWDExpress\” for “\VisualStudio\”.

如何禁止KnockoutJs在VS2012的智能格式化的更多相关文章

  1. visual assist x vs2012不智能提示

    今天装了visual assist x,但是在vs2012里不智能提示,在哪里看了看.找到了开关. 我英文不好.... 默认的话是不选中的.

  2. VS2012配置astyle格式化代码

    1.工具->扩展和更新,搜astyle插件,下载安装重启,当前是2.0版本. 2.工具->选项->AStyle Formatter->Edit,填入下面的,点击save,确定. ...

  3. [硬件黑客]钉钉智能指纹考勤机M1硬件漏洞挖掘(不定期更新)

    mailto:wangkai0351@gmail.com 钉钉智能指纹考勤机M1s,支持指纹.WIFI.蓝牙.GPS四种考勤方式,并且可实时查看考勤数据,自动生成考勤报表,告别人工核算,数据云端存储不 ...

  4. Resharper 8.2的“安装”问题

    概述 完美解决Resharper 8.2的“安装”问题和VS2012写Javascript语句无法智能提示的问题: 目录 引言——Resharper 简介——安装——VS2012智能提示测试 引言 最 ...

  5. 前端实用程序包utils - 开发工作流(一)

    写在前面 早年间有幸在Raychee哥门下当小弟,学到两把刷子.在编程路上,他的很多思想深深影响了我,比如笔者今天要分享的主题.在程序开发中,有个utils包,叫做实用程序包,程序员们会把项目中通用的 ...

  6. Asp.Net Mvc视图引擎Razor介绍

    1.Razor介绍 1)ASP.NET MVC3 带来了一种新的名为Razor 的视图引擎,提供了下列优点: Razor 的语法简单且清晰,只需要最小化的输入 Razor 容易学习,语法类似于 C#  ...

  7. Android Studio经常使用操作技巧(不断更新)

    这段时间一直在用Android Studio做一些Demo的开发.一開始从Eclipse中转向这个开发工具,各种不适应,希望此博文能够一直更新.还有网友能够分享出自己方便更好更快开发的一些技巧. 首先 ...

  8. auto_ptr and scoped_ptr

    #include "boost/scoped_ptr.hpp" #include <iostream> #include <memory>//contain ...

  9. 软工+C(10): 团队项目[NABCD] - 对话式编辑

    上一篇:助教指南,持续更新... 下一篇:从命令行开始逐步培养编程能力(Java) 动机(Motivation) Eating your own dog food, also called dogfo ...

随机推荐

  1. TransactionScope使用

    public void FixProjectSorceInsert() { TransactionOptions transactionOption = new TransactionOptions( ...

  2. sharepoint 2013 未能加载类型"Microsoft.AnalysisServices.SharePoint.Integration.ReportGalleryView"

    最近在做PowerPivot for sharepoint server 2013的时候,创建PowerPivot库,之后打开,出现了一个问题: 未能加载类型"Microsoft.Analy ...

  3. UNIX基础知识之用户标识

    一.用户ID 口令文件(/etc/passwd)登录项中的用户ID(user ID)是个数值,它向系统标识各个不同的用户.系统管理员在确定一个用户的登录名的同时,确定其用户ID.用户不能更改其用户ID ...

  4. 目录操作函数opendir、readdir和closedir

    首先,明确一个类型DIR的含义: #include <dirent.h> DIR    A type representing a directory stream. DIR是在目录项格式 ...

  5. restful php

    http://bbs.phpchina.com/thread-228725-1-1.html http://www.cnblogs.com/artech/p/3506553.html http://w ...

  6. discuz2.0升级后不能自动跳转问题

    /static/js/admincp.js文件有问题,重新覆盖,在后台:运营->更新缓存就ok了

  7. 图片onerror(转)

    <script type="text/javascript"> <!– function nofind(){ var img=event.srcElement; ...

  8. Android(java)学习笔记116:PC_Phone通信程序报错

    1.首先我写的程序代码如下: package com.himi.udpsend; import java.net.DatagramPacket; import java.net.DatagramSoc ...

  9. Android网络请求与解析

    1.Volley和Gson结合使用——Volley适用于小型数据,多次的请求,使用Gson解析时,服务器数据的键值不能包含常用的标识符如:class.....等,这些就需要与服务端小伙伴商量 这样也可 ...

  10. C语言有关数组的几点

    动态大小数组 先来看一段代码: ; int a[n]; int i; ;i<n;i++) { a[i]=i; printf("%d\n",a[i]); } 我在声明数组a时, ...