単一のウィンドウでdiredを動作させて、ディレクトリをトラバースするときに、中間ディレクトリ用のdiredバッファがn個ないようにする方法はありますか?ただし、完全に別のディレクトリで別のdiredバッファを開始した場合(すでに開いているdiredインスタンスのサブディレクトリで[Enter]キーを押すのではなく、ミニバッファから)、2つの別々のdiredバッファを保持したい... ido-modeをオンにしているので、ido-diredを使用していますが、解決策が異なるかどうかわかりませんか?どうもありがとう!
5 に答える
;ではなくサブディレクトリで( )を押すことで、dired-buffer
混乱を減らします。現在のdiredウィンドウをリサイクルします。adired-find-alternate-file
RET
http://www.emacswiki.org/emacs/dired-single.el
;;; dired-single.el --- Reuse the current dired buffer to visit another directory... ;;; Commentary: ;; ;; This package provides a way to reuse the current dired buffer to visit ;; another directory (rather than creating a new buffer for the new directory). ;; Optionally, it allows the user to specify a name that all such buffers will ;; have, regardless of the directory they point to...
Dired +を使用すると、これをオプションで実行でき、いつでもオン/オフを切り替えることができます。
http://www.emacswiki.org/emacs/DiredReuseDirectoryBufferも参照してください。
このような?
(defadvice dired-find-file (around kill-old-buffer activate)
"When navigate from one dired buffer to another, kill the old one."
(let ((old-buffer (current-buffer))
(new-buffer (dired-get-filename)))
ad-do-it
(kill-buffer old-buffer)
(switch-to-buffer new-buffer)
))
ほとんどの場合、各diredバッファーをすべて単一の階層の下にあるさまざまなサブディレクトリ(たとえば、進行中の複数のプロジェクトごとに1つのdiredバッファー)で動作させたい場合は、組み込みi
(dired-maybe-insert-subdir)とk
(バッファから削除するために挿入されたサブディレクトリのヘッダーにdired-do-kill-lines )コマンド。それらはあなたが単一のdiredバッファ内の複数のディレクトリを編集することを可能にします。ただし、小さなカスタムコマンドが必要なRET
場合は、それが筋肉の記憶に深く根付いている場合は再マッピングする必要があります。