Mac 下 PyCharm 将 py 文件解析成 text 文件解决方案

PyCharm 将某个 py 文件解释成文本文件,没有代码提示,也无法执行。

重启、重装、删除IDE配置都不好使(可能IDE配置没删掉),后来发现是 File Types 设置的问题。

解决方法:

  • Windows:【File】->【Settings】->【Editor】->【File Types】->选择【Text】
  • Mac:【Pycharm】->【Preferences】->【Editor】->【File Types】->选择【Text】

在 【Registered Patterns】中找到变灰文件名的后缀,点击删除后保存就可以了。

猜你喜欢

转载自blog.csdn.net/yilovexing/article/details/114436867