PyCharm change file type association(PyCharm 更改文件类型关联)
问题描述
我在 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.
所以转到设置
|编辑器
|File Types
,找到你不小心贴错标签的类型并将其从Registered Patterns"列表中删除.
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 更改文件类型关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PyCharm 更改文件类型关联
基础教程推荐
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01