1

例如,我希望它不显示与模式匹配的所有文件*~

编辑:以下工作:

(add-hook 'dired-load-hook
      (lambda ()
        (load "dired-x")
        ;; Set dired-x global variables here.  For example:
        ;; (setq dired-guess-shell-gnutar "gtar")
        ;; (setq dired-x-hands-off-my-keys nil)
        ))
(setq dired-omit-files "^#\\|~$")
(add-hook 'dired-mode-hook
      (lambda ()
        ;; Set dired-x buffer-local variables here.  For example:
        (dired-omit-mode 1)
        ))
4

2 回答 2

1

如果您使用 dired-x,请阅读此处,或 fired dired,请阅读此讨论。在 dired 的情况下,建议的解决方案采用正则表达式,该表达式将过滤掉要显示的内容并仅显示这些文件。在您的情况下,这可能有点棘手。

于 2011-05-05T03:06:14.500 回答
1

在 SuperUser 上回答过,但我也会在这里回答。使用dired-omit

Dired-Omit minor mode (indicator Omit):
Toggle Dired-Omit mode.
With numeric ARG, enable Dired-Omit mode if ARG is positive, disable
otherwise.  Enabling and disabling is buffer-local.
If enabled, "uninteresting" files are not listed.
Uninteresting files are those whose filenames match regexp `dired-omit-files',
plus those ending with extensions in `dired-omit-extensions'.

dired-omit是的一部分dired-x

于 2011-05-08T12:30:01.970 回答