gpt4 book ai didi

emacs - 如何在 GNU Emacs 中获取最近文件的列表?

转载 作者:行者123 更新时间:2023-12-03 10:16:28 25 4
gpt4 key购买 nike

当我使用 Emacs 时,我希望能够轻松地显示和浏览我处理的文件列表,不仅是当前 session ,还包括以前的 session 。 (顺便说一句,在 Windows 上运行 Emacs 22.2)

最佳答案

来自 Joe Grossberg的博客(不再可用):

But if you're using GNU Emacs 21.2 (the latest version, which includes this as part of the standard distro), you can just put the following lines into your .emacs file

;; recentf stuff
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)

Then, when you launch emacs, hit CTRL-X CTRL-R. It will show a list of the recently-opened files in a buffer. Move the cursor to a line and press ENTER. That will open the file in question, and move it to the top of your recent-file list.

(Note: Emacs records file names. Therefore, if you move or rename a file outside of Emacs, it won't automatically update the list. You'll have to open the renamed file with the normal CTRL-X CTRL-F method.)

Jayakrishnan Varnam has a page including screenshots of how this package works.



注意:您不需要 (require 'recentf)线。

关于emacs - 如何在 GNU Emacs 中获取最近文件的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50417/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com