Dired模式单窗口? (emacs)
有没有一种方法可以在单个窗口中进行 dired 操作,这样当我遍历目录时,中间目录就没有 n 个 dired 缓冲区?但是 - 如果我在一个完全独立的目录中启动另一个 dired 缓冲区(从迷你缓冲区而不是在已经打开的 dired 实例中的子目录上点击 [enter]),我想保留两个单独的 dired 缓冲区...我想我因为我打开了 ido-mode,所以正在使用 ido-dired,但我不知道解决方案会有所不同?非常感谢!
is there a way to have dired operate in a single window so that when I traverse through directories I don't have n number of dired buffers for the intermediate directories? However - if I start another dired buffer in a completely separate directory (from the minibuffer rather than hitting [enter] on a subdirectory in an already open dired instance) I'd like to retain the two separate dired buffers... I guess I'm using ido-dired since I have ido-mode on but I don't know that the solution would be different? Thanks much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
像这样?
Like this?
如果您主要想让每个 dired 缓冲区与同一层次结构下的各个子目录一起工作(例如,为多个正在进行的项目中的每一个项目分配一个 dired 缓冲区),您可以使用内置的
i
(< em>dired-maybe-insert-subdir) 和k
(dired-do-kill-lines 位于插入的子目录的标头上,以将其从缓冲区)命令。它们将允许您在单个目录缓冲区内编辑多个目录。如果 RET 在您的肌肉记忆中根深蒂固,您可能需要一个小的自定义命令并重新映射 RET。If you mostly want to have each dired buffer work with various subdirs that are all under a single hierarchy (e.g. one dired buffer for each of several ongoing projects), you can use the built-in
i
(dired-maybe-insert-subdir) andk
(dired-do-kill-lines on the header of an inserted subdir to remove it from the buffer) commands. They will let you edit multiple directories inside a single dired buffer. You might want a small custom command and to remapRET
if it is too ingrained in your muscle memory though.我通过在子目录上点击 a (
dired-find-alternate-file
) 来减少dired-buffer
混乱,而不是 RET< /kbd>;回收当前的 Dired 窗口。I reduce the
dired-buffer
clutter by hitting a (dired-find-alternate-file
) on subdirectories, rather than RET; that recycles the current dired window.http://www.emacswiki.org/emacs/dired-single.el
http://www.emacswiki.org/emacs/dired-single.el
Dired+ 允许您选择执行此操作,并且它允许您可以随时打开/关闭它。
另请参阅 http://www.emacswiki.org/emacs/DiredReuseDirectoryBuffer。
Dired+ lets you do this optionally, and it lets you toggle it on/off anytime.
See also http://www.emacswiki.org/emacs/DiredReuseDirectoryBuffer.