如果我已标记多个文件,如何找到/访问所有这些标记的文件在Emacs,运行旁边dired-find-file
上他们每个人的?
是否有一个内置的命令,或者我需要一些额外的Lisp代码?
如果我已标记多个文件,如何找到/访问所有这些标记的文件在Emacs,运行旁边dired-find-file
上他们每个人的?
是否有一个内置的命令,或者我需要一些额外的Lisp代码?
如果您添加到您的.emacs,你就可以通过按键绑定“F”打开文件。
(eval-after-load "dired"
'(progn
(define-key dired-mode-map "F" 'my-dired-find-file)
(defun my-dired-find-file (&optional arg)
"Open each of the marked files, or the file under the point, or when prefix arg, the next N files "
(interactive "P")
(let* ((fn-list (dired-get-marked-files nil arg)))
(mapc 'find-file fn-list)))))
很明显,你可以只覆盖内置的“F”如果你想要的。
在Emacs 23.2和更高版本, dired-x.el
模块是可用的,并且它可以让你访问到不正是你想要的命令。 您加载它(只是后(load "dired-x")
正常),你就可以调用该函数dired-do-find-marked-files
。 下面是其内置的文档:
(dired-do-find-marked-files &optional NOSELECT)
Find all marked files displaying all of them simultaneously.
With optional NOSELECT just find files but do not select them.
The current window is split across all files marked, as evenly as possible.
Remaining lines go to bottom-most window. The number of files that can be
displayed this way is restricted by the height of the current window and
`window-min-height'.
To keep dired buffer displayed, type C-x 2 first.
To display just marked files, type C-x 1 first.
所以经过dired-x
被加载时,你可以使用MX dired-do-find-marked-files
RET,你会得到你的问题问什么:所有标记的文件将被访问,就好像你运行dired-find-file
上所有的人。
你可以尝试dired +提供许多扩展到包括dired选择多个文件,找到能力/查看所有。