更改PyCharm CE中每个文件的突出显示设置(默认情况下) [英] Change highlighting setting for every file (by default) in PyCharm CE

查看:155
本文介绍了更改PyCharm CE中每个文件的突出显示设置(默认情况下)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用PyCharm作为Python的IDE.此刻,每当我打开一个新的.py文件时,都必须转到代码"->配置当前文件分析...",然后将每个.py文件的突出显示更改为语法(首选项).

I just started using PyCharm as my IDE for Python. At the moment whenever I open a new .py file, I have to go to Code -> Configure Current File Analysis..., and then change the highlighting to syntax (preference) for every individual .py file.

有没有一种方法可以默认自动为每个文件更改此设置?

Is there a way to change this for every file automatically, by default?

顺便说一句关于stackoverflow的帖子.

First post on stackoverflow by the way.

谢谢!

推荐答案

如果您不想看到PyCharm的代码检查,我建议您创建一个不进行检查的新检查配置文件.为此,请像以前一样转到代码"->配置当前文件分析"对话框,但这一次单击Configure inspections链接.在顶部,单击管理"下拉菜单,然后将当前配置文件复制到一个新的配置文件中,您将其命名为无检查".然后取消所有检查,保存新的检查配置文件,您将完成.现在,所有新的.py文件都应在无需检查"配置文件下创建.

If you prefer not to see PyCharm's code inspections, I would suggest creating a new inspections profile that does no inspections. To do that, go to the Code -> Configure Current File Analysis dialog like you have been, but this time click on the Configure inspections link. At the top, click the "Manage" dropdown and copy the current profile into a new profile which you'll name "No inspections". Then uncheck everything, save the new inspections profile, and you'll be done. All new .py files should now be created under your "No inspections" profile.

请注意,据我所知,检查设置是按项目保存的,而不是全局设置.但是,每个项目只更改一次检查配置文件就不会太麻烦.

Note that as far as I can tell, the inspection settings get saved per-project, rather than as a global setting. But changing the inspection profile once per project shouldn't be too much of a hassle.

这篇关于更改PyCharm CE中每个文件的突出显示设置(默认情况下)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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