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. 取消掉Transfer-Encoding:chunked

    先说解决方法:::不让服务器返回Transfer-Encoding:chunked,在客户端请求的时候可以使用http 1.0的协议. 有时候,Web服务器生成HTTP Response是无法在Hea ...

  2. hive-0.10.0-cdh4.3.0安装

    1.我使用的Hadoop2.0-cdh4.3.0,相应hive配套版本号hive-0.10.0-cdh4.3.0.    2.改动hive/conf下hive-site.xml文件,无则创建hive- ...

  3. LeetCode: Binary Tree Traversal

    LeetCode: Binary Tree Traversal 题目:树的先序和后序. 后序地址:https://oj.leetcode.com/problems/binary-tree-postor ...

  4. MySQL查询缓存详解

    一:缓存条件,原理 MySQL Query Cache是用来缓存我们所执行的SELECT语句以及该语句的结果集,MySql在实现Query Cache的具体技术细节上类似典型的KV存储,就是将SELE ...

  5. SQLite数据库中获取新插入数据的自增长ID

    SQLite数据库中有一有列名为ID的自增列,项目需求要在向数据库在插入新数据的同时返回新插入数据行的ID. 我这里用事务,把插入和查询语句通过ExecuteReader一起提交,返回DbDataRe ...

  6. 利用 Composer 完善自己的 PHP 框架(一)——视图装载

    本教程示例代码见 https://github.com/johnlui/My-First-Framework-based-on-Composer 回顾 经过了上一个 系列教程  <利用 Comp ...

  7. Debian安装Apache2+MySQL5+PHP5(zz)

    转载:http://hi.baidu.com/lostdays/item/1d5e7e4833b4d20fc116134b 终于在Debian用apt-get安装好LAMP了,之前在CentOS使用编 ...

  8. BestCoder Sequence

    hdu  4908  Bestcoder Problem Description Mr Potato is a coder.Mr Potato is the BestCoder. One night, ...

  9. Java并发包学习--ReentrantLock

    这个锁叫可重入锁.它其实语义上和synchronized差不多,但是添加了一些拓展的特性. A reentrant mutual exclusion Lock with the same basic ...

  10. ie6/7/8中span右浮动折行问题的解决方案

    浮动标准: W3C CSS 2.1 规范文档里对于浮动元素与非浮动行内元素相邻时的情况有如下解释.以下是关键段落: A floated box is shifted to the left or ri ...