且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 VS Code 中为新文件设置默认文件类型?

更新时间:2022-12-23 18:19:18

点击 File –> Preferences –> SettingsCTRL + ,

Click File –> Preferences –> Settings or CTRL + ,

点击打开设置文件并查找files.defaultLanguage

Click to open the settings file and look for files.defaultLanguage

将光标移动到这一行或将鼠标悬停在其上,单击左侧显示的铅笔符号,单击Copy to Settings,然后在右侧窗格中添加文件类型.比如

Move the cursor to this line or mouse hover on it, click the pencil sign shown on the left, click the Copy to Settings, then add the file type in the right pane. such as

"files.defaultLanguage": "JSON",

CTRL + S 完成后