Pycharm utils.py 没有得到语法高亮 [英] Pycharm utils.py not getting syntax highlight

查看:20
本文介绍了Pycharm utils.py 没有得到语法高亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个 django 项目和几个不同的名为 utils.py 的文件,但是 pycharm 将它们视为简单的 .txt 文件,没有语法高亮或任何其他类型的解析,我该如何解决这个问题?

I have several django projects and several different files with name utils.py, however pycharm treats them as simple .txt files with no syntax highlighting or any other kind of parsing, how can I fix this?

推荐答案

请看文件 |设置(Mac 上的首选项) |编辑器 |文件类型,选择文本并从那里删除utils.py.它很可能是从文件右键单击上下文菜单中意外添加的.

Please see File | Settings (Preferences on Mac) | Editor | File Types, select the Text and remove utils.py from there. Most likely it was added by accident from the file right click context menu.

如果在那里找不到文件扩展名,请关闭 IDE 并在 IDE 配置目录.编辑此文件并从中删除不正确的映射,或删除此文件以将所有文件映射重置为默认值.

If you can't find the file extension there, close the IDE and look for options/filetypes.xml file in the IDE configuration directory. Either edit this file and remove the incorrect mapping from it or delete this file to reset all the file mappings to the defaults.

这篇关于Pycharm utils.py 没有得到语法高亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆