PyCharm更改文件类型关联 [英] PyCharm change file type association
问题描述
我在PyCharm中有一个文件,它曾经只是一个 .txt
文件。
现在我想使用 .rst
(reStructuredText)。
I have a file in PyCharm and its used to be just a .txt
file.
Now I wanted to use .rst
(reStructuredText).
我知道当我打开一个第一次没有结束的文件PyCharm询问我是什么类型的文件以及如何解释语法。
I know that when I open a file without an ending for the first time PyCharm asks me what kind of file it is and how the syntax should therefore be interpreted.
我可以以某种方式再次打开该对话框,或者我可以用其他方式更改关联吗?
Can i open up that dialog again somehow, or can I change the association in some other way?
推荐答案
实际上,@ CrazyCoder是对的:
如果你不小心错误标记文件,PyCharm记住它并根据名称为新文件设置模式。
Actually, @CrazyCoder is right: If you accidentally mis-labeled the file, PyCharm remembers it and sets a "pattern" for the new file based on the name.
所以转到设置
| 编辑
| 文件类型
,找到您不小心贴错标签的类型,并将其从已注册的模式列表中删除。
So go to Settings
| Editor
| File Types
, find the type you accidentally mislabeled and remove it from the "Registered Patterns" list.
例如,我把osm.py误作为文本文件,所以在文本文件下我有:
For example, I mislabed "osm.py" as text file, so under "Text files" I have:
*.bat
*.cgi
.
.
.
osm.py
删除它,你得到你的py文件颜色!您还可以在没有扩展名的情况下注册文件关联。默认情况下,它与文本文件关联。
Remove it and you get your py file colors back! You can also register a file association where there is no extension. By default this is associated as "Text file".
更多关于文件类型。
这篇关于PyCharm更改文件类型关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!