Visual Studio如何选择用于文件的编辑器? [英] How does Visual Studio choose which editor to use for a file?
问题描述
我的项目存储html代码片段,用于模板中具有自定义扩展名(* .phtml)的文件.当我编辑这些文件时,我发现Visual Studio在使用编辑器时不一致.有时它不提供智能,有时将文件视为XML(总比没有好),有时我很幸运,并且为我提供了HTML编辑器.
My project stores html code fragments for use in templating in files with a custom extension (*.phtml). I find that Visual Studio is inconsistent in its use of editors when I edit these files. Sometimes it provides no intellisense, sometimes it treats the files as XML (which is better than nothing), and sometimes I get lucky and it provides me with the HTML editor.
我已经将Visual Studio配置为将* .phtml文件视为HTML,但这似乎没有任何区别.
I've configured Visual Studio to treat *.phtml files as HTML, but that doesn't seem to make any difference.
我还能做些什么以说服Visual Studio始终对* .phtml文件使用HTML编辑器?
What more can I do to convince Visual Studio to always use the HTML Editor for *.phtml files?
推荐答案
在解决方案资源管理器中右键单击文件会显示打开方式为..."选项,打开的窗口可以选择编辑器以及设置"作为默认"选项.
Right-clicking a file in solution explorer shows an "Open with ..." option, the window that it opens has a choice of editors plus a "Set as default" option.
这篇关于Visual Studio如何选择用于文件的编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!