zoukankan      html  css  js  c++  java
  • 如何禁止KnockoutJs在VS2012的智能格式化

    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_USERSoftwareMicrosoftVisualStudio11.0HTML 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_USERSoftwareMicrosoftVisualStudio11.0HTML 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”.

  • 相关阅读:
    bzoj2763 [JLOI]飞行路线 分层图最短路
    [模板]分块/可修改莫队 (数颜色种类)
    gcd步数
    洛谷2378 因式分解 字符串
    bzoj1090 字符串折叠
    洛谷1034 NOIP2002 矩形覆盖
    Codeforces#441 Div.2 四*题
    SPFA的小优化
    洛谷1073 NOIP2009 最优贸易
    bzoj2100 [Usaco2010 DEC]Apple Delivery苹果贸易
  • 原文地址:https://www.cnblogs.com/handboy/p/3261358.html
Copyright © 2011-2022 走看看