Visual Studio 2010可以执行".inc"吗?文件语法高亮显示? [英] Can Visual Studio 2010 do ".inc" file syntax highlighting?

查看:136
本文介绍了Visual Studio 2010可以执行".inc"吗?文件语法高亮显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将Visual Studio 2010配置为对".inc"文件进行语法突出显示?我们有许多大型项目,其中包含大量的".inc"文件(asp文件),因此不能将文件扩展名更改为".asp".我希望Visual Studio 2010要做的就是在语法高亮显示时像对待".asp"文件一样对待这些".inc"文件.

Can Visual Studio 2010 be configured to do syntax highlighting on ".inc" files? We have numerous large projects with tons of these ".inc" files (asp files) and so changing the file extension to ".asp" is not an option. All I want Visual Studio 2010 to do is treat these ".inc" files just like ".asp" files when it comes to syntax highlighting.

我尝试使用打开方式..."并选择了HTML编辑器,它是默认的".asp",但是没有用.我尝试了列表中的所有其他编辑器,但没有一个起作用.

I've tried "Open With..." and selected the HTML Editor, which is the ".asp" default, but that did not work. I tried about every other editor in the list and none of them worked.

我知道Notepad ++(以及其他)可以做到这一点,但我更希望在Visual Studio 2010中完成-使用其他IDE或文本编辑器并不是我在这里寻找的答案.

I know Notepad++ (among others) can do this, but I would prefer this be done in Visual Studio 2010 - using another IDE or text editor is not the answer I'm looking for here.

推荐答案

在Visual Studio中...转到选项->文本编辑器->文件扩展名.输入"inc"作为扩展名,输入"Web表单编辑器".您可能需要关闭然后重新打开当前打开的.Inc页面...希望有帮助

In Visual Studio...go to Options -> Text Editor -> File Extension. Type in 'inc' as extension and editor as 'Web Form Editor'. You may need to close then re-open your currently open .Inc pages...Hope this helps

这篇关于Visual Studio 2010可以执行".inc"吗?文件语法高亮显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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