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屋!