英文:
Set .java as default file extension in vscode?
问题
有没有一种方法可以更改新文件的默认语言?默认情况下,当我们创建一个新文件时,它的扩展名被设置为“txt”。我希望“.java”作为默认的文件扩展名。
我尝试过使用“files.defaultLanguage”:“java”,
但是这会将文件扩展名设置为“.class”而不是“.java”。
如何将“.java”设置为默认的文件扩展名?
英文:
Is there a way to change the default language for new files? By default when we create a new file it is set as "txt"extensions.I want that ".java" as default file extension
I tried using "files.defaultLanguage":"java"
But this is setting file extension as ".class" instead of ".java"
How do I set ".java" as a default file extension?
答案1
得分: 1
这是一个关于VSCode的问题。实际上,它确实已经选择了'Java'作为文件类型。但是你会发现'Java'类型的文件扩展名列表为:*.class, *.java, *.jav, *.java, *.jav。所以,目前只能手动进行修改。我已经在GitHub上提交了一个功能请求:https://github.com/microsoft/vscode/issues/105463
英文:
It's an issue about VSCode. In fact, it really has chosen the 'Java' as the file type. But you can find the filename extension list of 'Java' type: *.class, *.java, *.jav, *.java, *.jav. So, you only can modify it manually for now. And I have put a feature request in Github: https://github.com/microsoft/vscode/issues/105463
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论