我不需要储蓄。如何使 Emacs 缓冲区与文件保持同步?
我希望所有文件缓冲区始终与磁盘上的文件内容同步。 有可能吗? (最好作为一种模式)
如果您认为它不安全,那么我只会说 emacs undo + git 对我来说已经足够了,我发现显式保存和恢复(如果其他程序更改了文件) )过时的安全功能。
I want to have all my file buffers always synchronized with the file content on disk.
Is is possible? (preferably as a mode)
If you think it is unsafe, than I will just say that emacs undo + git is more than enough for me and I find explicit saving and reverting (if other program changes the file) obsolete safety feature.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将它们整合在一起:
http://www .gnu.org/software/emacs/manual/html_node/emacs/Auto-Save-Files.html#Auto-Save-Files
这使得您的自动保存进入您正在处理的文件,而不是一个外置一.
然后,您可以将
auto-save-interval
设置为 1,并启用global-auto-revert-mode
就一切就绪了。我想这对你来说是这样的......
To bring it all together:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Save-Files.html#Auto-Save-Files
This makes your auto-saves go into the file you are working on, and not an external one.
Then you can set
auto-save-interval
to 1, and enableglobal-auto-revert-mode
and you're all set.I think that does it for you...
将“自动保存间隔”设置为 1。这将在您键入每个字符后保存。它将保存到“保存”文件,而不是实际文件,但您的工作将受到保护。
另一种选择是: http://www.litchie.net/programs/real -自动保存.html
Set the "auto-save-interval" to 1. That will save after each character you type. It will save to the "save" file, rather than the actual file, but your work will be protected.
Another option is this: http://www.litchie.net/programs/real-auto-save.html
听起来你想要 auto-revert-mode (或者更有可能是全局自动恢复模式)。
Sounds like you want auto-revert-mode (or more likely global-auto-revert-mode).