使PyCharm发出警报,以在外部更改文件时重新加载文件 [英] Make PyCharm alert to reload files when they're changed externally

查看:174
本文介绍了使PyCharm发出警报,以在外部更改文件时重新加载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用其他程序修改文件后切换回在PyCharm中打开的文件时,PyCharm不会立即弹出消息询问您是要从磁盘重新加载文件还是要保留在内存中的版本(与其他文件不同)我已经习惯了编辑器.)

When switching back to a file open in PyCharm after modifying it with another program, PyCharm doesn't immediately pop-up a message asking whether you want to reload the file from disk or stick to the version in your memory (unlike other editors I've become used to).

它所做的只是在顶部显示一个小条,上面有一个很小的重新加载按钮;直到您尝试保存文件时(弹出时间为时已晚),才会显示弹出消息.

All it does is shows a little bar on the top with a tiny reload button; the popup message doesn't display until you try to save the file (by which time it's too late).

我研究了一下;但找不到开关.我该如何设置Pycharm来做我想做的事情? (该解决方案不应禁用当您尝试关闭未保存更改的文件时弹出的保存对话框窗口.)

I researched a bit; but couldn't find a switch. How can I set the Pycharm to do what I want it to? (The solution shouldn't disable the save dialog window that pops up when you try to close a file with unsaved changes.)

PyCharm的小消息栏:

PyCharm's tiny message bar:

预期行为的示例:

推荐答案

请确保启用在框架激活时同步文件.在设置|外观和行为|系统设置,或设置|较旧版本的PyCharm(4.5之前)中的常规.

Please make sure that Synchronize files on frame activation is enabled. This is found in Settings | Appearance and Behavior | System Settings, or Settings | General in older versions of PyCharm (before 4.5).

还请注意,如果您通过符号链接或在网络文件系统上打开文件,可能会发生此类问题,这可能会阻止PyCharm正确接收文件更改通知.

Also note that problems like this can happen if you're opening a file through a symlink or on a network file system, which can prevent PyCharm from receiving file change notifications correctly.

这篇关于使PyCharm发出警报,以在外部更改文件时重新加载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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