有没有 emacs 工具可以将目录结构显示为树?
我知道 Speedbar(我更喜欢与我的其他作品在同一框架中的结构),并且 dired 显示了太多信息。我正在寻找类似 svn-status 树表示的东西。有这样的事吗? 谢谢。
编辑:这是我发现的最直观的:
我正在使用 Speedbar
以及来自 此处。我不得不使用评论的“尝试这个”部分,仅供参考。
(require 'speedbar)
(defconst my-speedbar-buffer-name "SPEEDBAR")
; (defconst my-speedbar-buffer-name " SPEEDBAR") ; try this if you get "Wrong type argument: stringp, nil"
(defun my-speedbar-no-separate-frame ()
(interactive)
(when (not (buffer-live-p speedbar-buffer))
(setq speedbar-buffer (get-buffer-create my-speedbar-buffer-name)
speedbar-frame (selected-frame)
dframe-attached-frame (selected-frame)
speedbar-select-frame-method 'attached
speedbar-verbosity-level 0
speedbar-last-selected-file nil)
(set-buffer speedbar-buffer)
(speedbar-mode)
(speedbar-reconfigure-keymaps)
(speedbar-update-contents)
(speedbar-set-timer 1)
(make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(lambda () (when (eq (current-buffer) speedbar-buffer)
(setq speedbar-frame nil
dframe-attached-frame nil
speedbar-buffer nil)
(speedbar-set-timer nil)))))
(set-window-buffer (selected-window)
(get-buffer my-speedbar-buffer-name)))
I am aware of Speedbar (I prefer the structure in the same frame as the rest of my work), and dired shows too much information. I'm after something like the svn-status tree representation. Is there anything like that?
Thank you.
EDIT: Here's what I found the most intuitive:
I am using Speedbar
with the following hack from here. I had to use the commented "try this" part, FYI.
(require 'speedbar)
(defconst my-speedbar-buffer-name "SPEEDBAR")
; (defconst my-speedbar-buffer-name " SPEEDBAR") ; try this if you get "Wrong type argument: stringp, nil"
(defun my-speedbar-no-separate-frame ()
(interactive)
(when (not (buffer-live-p speedbar-buffer))
(setq speedbar-buffer (get-buffer-create my-speedbar-buffer-name)
speedbar-frame (selected-frame)
dframe-attached-frame (selected-frame)
speedbar-select-frame-method 'attached
speedbar-verbosity-level 0
speedbar-last-selected-file nil)
(set-buffer speedbar-buffer)
(speedbar-mode)
(speedbar-reconfigure-keymaps)
(speedbar-update-contents)
(speedbar-set-timer 1)
(make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(lambda () (when (eq (current-buffer) speedbar-buffer)
(setq speedbar-frame nil
dframe-attached-frame nil
speedbar-buffer nil)
(speedbar-set-timer nil)))))
(set-window-buffer (selected-window)
(get-buffer my-speedbar-buffer-name)))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
所以我想快速打印一棵树,所有基于 Emacs 的解决方案看起来要么相当旧,要么像(ECB/CEDET)那样庞大,我对此不太了解,所以为了快速修复,我
从可怕的缓冲区中
做了,瞧!没有任何特定库的目录树,作为使用
tree -f
输出具有完整路径的树的额外好处,使得直接从树输出跳转到使用Cx Cf
的文件变得显而易见缓冲。So I wanted to just print a tree quickly and all Emacs based solutions seemed either rather old or massive like (ECB/CEDET) which I don't know enough about, so for quick fix I did
then from dired buffer
voilà! directory tree without any specific libs, as an added bonus using
tree -f
outputs tree with full paths, making it obvious to jump to file withC-x C-f
directly from the tree output buffer.emacs 模式有一个 树扩展 日出指挥官。日出指挥官就像午夜指挥官。
There is a tree extension for emacs mode Sunrise Commander. Sunrise Commander is like Midnight Commander.
有 Emacs 代码浏览器。最后我听说在当前的 emacs 中使用它可能会很棘手或困难,因为它使用了一些最近通过 CEDET。
There's the Emacs Code Browser. Last I heard using it with a current emacs may be tricky or difficult because it makes use of some tools that were recently integrated into Emacs via CEDET.
我推荐 NeoTree。它易于安装且易于使用。
I'd recommend NeoTree. It's easy to install and easy to use.