0
我發現有很多像Emacs生成的文件。這些文件是什麼?有沒有人能把他們放在一個地方,並停止在項目中徘徊?奇怪的從Emacs生成的文件
app/helpers/#application_helper.rb#
感謝
我發現有很多像Emacs生成的文件。這些文件是什麼?有沒有人能把他們放在一個地方,並停止在項目中徘徊?奇怪的從Emacs生成的文件
app/helpers/#application_helper.rb#
感謝
這些文件會自動保存Emacs可以編輯的文件版本。你可以告訴Emacs的把所有自動保存文件和所有備份文件(在~
結束那些)在一個地方,加入給你的.emacs
或.emacs.d/init.el
文件:
(setq backup-directory-alist
`((".*" . ,(expand-file-name
(concat user-emacs-directory "backups"))))
(setq auto-save-file-name-transforms
`((".*" ,(expand-file-name
(concat user-emacs-directory "backups") t)))
這將設置該目錄是~/.emacs.d/backups/
。另一種常見的事是目錄設置爲臨時目錄:
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
或者,你可以完全禁用自動保存,但不建議這樣做。
編輯:我剛剛發現此相關的問題有很多意見如何配置此行爲:How do I control how Emacs makes backup files?
看到http://www.gnu.org/software/emacs/manual/html_node/emacs/ Auto-Save-Files.html#自動保存文件 – ymonad 2014-11-05 06:08:56
@ymonad感謝您的文檔。它回答我的問題,請將評論作爲答案。我會將它標記爲可接受的:) – nXqd 2014-11-05 06:46:36