How does Visual Studio choose which editor to use

2020-02-15 04:05发布

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.

I've configured Visual Studio to treat *.phtml files as HTML, but that doesn't seem to make any difference.

enter image description here

What more can I do to convince Visual Studio to always use the HTML Editor for *.phtml files?

1条回答
来,给爷笑一个
2楼-- · 2020-02-15 04:39

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.

查看更多
登录 后发表回答