除了 Emacs 代码浏览器 (ECB) 之外,您还知道用于 Emacs 的优秀项目树浏览器吗?我看重的特性是简单、轻量级和语言不可知论。
8 回答
我自己还没有尝试过这个,但是emacs-nav是来自 Google 的一个新的 Emacs 项目浏览器,它似乎具有您所重视的功能。
你可以试试sr-speedbar。太棒了。
cedet的不同部分会做你想做的事。Speedbar 有树结构的东西,EDE 处理项目等。
我刚才在 中搜索了“探索” package-list-packages
,然后发现了project-explorer
。似乎完全符合我今天想要的(我几乎不编码,但我掌握了我的 Jekyll 网站的结构)。
关键包括:
TAB
用于折叠和展开目录RET
用或打开文件f
。带有C-u
前缀,它会很好地提示哪个窗口,甚至从那里你可以决定使用窗口还是打开一个新的窗口(我没有在包代码中找到提示字符串,所以它似乎很好地利用了内置的 Emacs 功能;实际上它看起来很dired
均匀)。
它可以在 Melpa 和 Marmalade 上买到。它可以在 Github 的sabof/project-explorer上找到。
为方便起见,我包括了网站的图片:
我不使用projectile
or helm
,但它有一些集成。
以下是我对几个竞争文件资源管理器类型包的想法。请参阅下面每个包上方的评论:
;; Dired itself allows one to do 'i' to insert (display in same buffer) the
;; subdirectory under point and C-u k on subdir header line to remove. However,
;; I have found that dired-subtree-toggle and dired-subtree-remove are a better solution for the removal
;; part. Plus dired-subtree let's you customize colors of subdirs to set them apart
;; visually. However, I set all depths of subdirectories custom faces to be the same as I found it distracting.
(use-package dired-subtree
:ensure t
:bind (:map dired-mode-map ("i" . 'dired-subtree-toggle))
:bind (:map dired-mode-map ("I" . 'dired-subtree-remove)))
;; This works nicely. It provides the parent, '..', directory unlike nav.
(use-package project-explorer
:ensure t
:config
(evil-set-initial-state 'project-explorer-mode 'emacs))
;; This can't go above the directory you started it in. It is nice, but I prefer the flexibility
;; of getting to parent directories in most cases.
(use-package dirtree
:ensure t)
;; Google's file explorer
;; Nice, but doesn't maintain visited nodes in view, preferring instead to offer only
;; the current directory or lower in a side window. No better than ivy which is my main file explorer system.
(use-package nav
:ensure t)
;; This is buggy on Emacs 26.1.
(use-package eproject
:disabled t
:ensure t)
;; speedbar is included with Emacs (since 24.x I believe). It has to use a separate frame, which is
;; inconvenient most of the time. There are better options (above).
;; (use-package speedbar)
;; Buggy; doesn't work on Emacs 26.1 (at least with my config).
(use-package sr-speedbar
:disabled t
:load-path "../lisp")
;; Buggy on Emacs 26.1 (at least with my config). I couldn't even get it to activate.
(use-package ecb
:disabled t
:ensure t)
;; Nice, but similar to ivy which I've already committed to, so not necessary.
(use-package lusty-explorer
:disabled t
:ensure t)
对我来说,ivy plus dired 让我成功了 98%。ivy、dired 和 dired-subtree 让我完成了 99% 的工作。project-explorer,以及在较小程度上,nav,只是 ivy plus dired 或 ivy plus dired 和 dired-subtree 的不错替代品。希望这会为您节省一些时间。
我用过treemacs,效果很好,尤其是。与弹丸。