例如,我希望它不显示与模式*~匹配的所有文件
编辑:如下所示:
(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)
))发布于 2011-05-05 11:06:15
如果使用dired-x、read here或fir dired,请阅读this discussion。在dired的情况下,建议的解决方案采用正则表达式,该正则表达式将过滤出要显示的内容,并仅显示这些文件。在您的情况下,这可能有点棘手。
发布于 2011-05-08 20:30:02
在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的一部分。
https://stackoverflow.com/questions/5892127
复制相似问题