JSON Javascript highlighting in Visual Studio 2010

…衆ロ難τιáo~ 提交于 2019-11-30 22:55:36

问题


Does anybody know how to get VS 2010 to use the same highlighting for a file called .JSON as it uses for a JavaScript file? Just working on a client site and they've named all their JSON template files as .JSON, with the result that I just get a plain old text editor when I open it in Visual Studio. Any suggestions? I'm sure there must be an option somewhere that would do it but I can't find it so far...


回答1:


Tools -> Options -> Text Editor -> File Extension

End your extension 'json' and select 'Script Editor' and click 'add'.

Re-open any json documents for it to take affect.




回答2:


Another option is to use Text Highlighter (extention for Visual Studio 2010), which offers syntax highlighting for the following text formats:

  • .json (also offer syntax validation)
  • .bat
  • .cmd
  • .ini
  • .txt
  • .log



回答3:


Great news!

In CTP2 of Visual Studio 2013 Update 2 that was added a New JSON project item and editor



来源:https://stackoverflow.com/questions/4034082/json-javascript-highlighting-in-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!