有沒有辦法使dired在單個窗口中操作,以便當我遍歷目錄時,我沒有n個針對中間目錄的dired緩衝區?然而 - 如果我在完全獨立的目錄中啓動另一個dired緩衝區(從minibuffer而不是在已打開的dired實例的子目錄中輸入[enter]),我想保留兩個獨立的dired緩衝區...我想我我使用ido-dired,因爲我有ido模式,但我不知道解決方案會有所不同?非常感謝!直接模式單窗口? (emacs)
8
A
回答
17
我通過敲擊降低dired-buffer
雜波(dired-find-alternate-file
)上的子目錄,而不是RET;回收當前直接窗口。
11
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...
1
喜歡這個?
(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)
))
1
如果你主要是想和那都是下一個層次結構(例如,一個用於每幾個正在進行的項目dired緩衝)各子目錄每個dired緩衝區的工作,你可以使用內置的i
(可能插入子目錄)和k
(dired-do-kill-lines在插入子目錄的標題上將其從緩衝區中刪除)命令。他們將允許您在單個dired緩衝區內編輯多個目錄。如果你的肌肉記憶太深入,你可能需要一個小的自定義命令並重新映射。
2
Dired+讓你可以選擇這樣做,它可以讓你隨時打開/關閉它。請參閱http://www.emacswiki.org/emacs/DiredReuseDirectoryBuffer。
相關問題
- 1. 引導 - 直接鏈接模式窗口
- 2. 直接鏈接到一個簡單的模式JQuery彈出窗口
- 3. R emacs窗口
- 4. Emacs GDB模式可以在單獨窗口中顯示錶達式
- 5. 模式窗口
- 6. 在emacs的窗口
- 7. Emacs窗口定位
- 8. 顯式設置Emacs窗口的大小
- 9. jquery鏈接打開模式窗口
- 10. 如何使連接模式窗口
- 11. Twitter BootStrap模式窗口後備鏈接
- 12. 如何在emacs中保存winring模式窗口配置?
- 13. emacs shell模式窗口中prlctl exec的問題
- 14. 拆分窗口後Emacs shell模式顯示太寬
- 15. 的模式窗口
- 16. 從父窗口關閉模式窗口
- 17. Emacs。如何在直接模式下隱藏一個點
- 18. emacs的選擇窗口
- 19. emacs gud窗口使用
- 20. Emacs Lisp - 打開新窗口
- 21. 如何使用默認簡單模式設置將垂直滑塊添加到簡單模式彈出窗口?
- 22. Highslide:如何使畫廊直接在頁面中工作,而不是彈出窗口或模式窗口?
- 23. 如何刪除Emacs中窗口之間的垂直邊界
- 24. Emacs使用鼠標調整垂直窗口的大小
- 25. 最大化Emacs窗口的水平或垂直
- 26. 直接在所有窗口上繪圖直接屏幕
- 27. 直接在窗口上使用GDAL
- 28. 直接窗口是否被淘汰?
- 29. 打開彈出窗口的直接URL?
- 30. 在窗口上直接綁定AttachedProperty
對不起大家,我事先做過Google,我保證!沒有意識到答案無處不在。但感謝所有的迴應! – hatmatrix
Duplicate question:http://stackoverflow.com/questions/1839313/how-do-i-stop-emacs-dired-mode-from-opening-so-many-buffers/1839493 – scottfrazer