Make PyCharm alert to reload files when they're changed externally

霸气de小男生 提交于 2019-12-12 14:12:42

问题


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).

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.)


Screenshots:

PyCharm's tiny message bar:

Example of expected behaviour:


回答1:


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).

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.



来源:https://stackoverflow.com/questions/21175677/make-pycharm-alert-to-reload-files-when-theyre-changed-externally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!