A good project tree browser for Emacs?
Asked Answered
S

9

48

Do you know of a good project tree browser for Emacs other than the Emacs Code Browser (ECB)? The features I value are simplicity, lightweightedness, and language agnosticism.

Sourdough answered 9/5, 2009 at 16:58 Comment(2)
I just decided to start using emacs and already spent like two days trying to find a tree that doesn't suck. I don't understand why none of these packages let you expand entire directory structure and not only first levelAlmire
@Agzam, I describe project-explorer below, it seems you can completely expand, with C-u S-TAB.Opalopalesce
H
25

Speedbar?

If you just want to manage related files, perhaps you would like eproject.

Happily answered 9/5, 2009 at 17:3 Comment(2)
I guess I had something like Speedbar in mind when I asked the question. However your eproject might what I was actually looking for without knowing it myself. Currently I rely on iswitch and ibuffer but they tend to become rather congested when working on two or three projects at the same time. Eproject seems to solve that problem.Sourdough
speedbar is included by default in emacs 24.Absorb
C
31

Projectile + NeoTree are my combination of choice.

Neotree

Projectile just uses your version control system to track files and has an awesome jump to file in project function.

Projectile

Also, check the notes for integrating the two together.

Cysteine answered 10/6, 2015 at 19:0 Comment(0)
H
25

Speedbar?

If you just want to manage related files, perhaps you would like eproject.

Happily answered 9/5, 2009 at 17:3 Comment(2)
I guess I had something like Speedbar in mind when I asked the question. However your eproject might what I was actually looking for without knowing it myself. Currently I rely on iswitch and ibuffer but they tend to become rather congested when working on two or three projects at the same time. Eproject seems to solve that problem.Sourdough
speedbar is included by default in emacs 24.Absorb
D
22

I haven't tried this one myself yet, but emacs-nav is a new Emacs project browser from Google that seems to have the features you value.

Duty answered 9/5, 2009 at 21:34 Comment(1)
I don't really understand nav... it's like sr-speedbar, but without the tree structure. What good is it without the tree structure??Belshin
K
9

You can try sr-speedbar. It's wonderful.

Kerianne answered 16/9, 2013 at 3:50 Comment(0)
B
7

The different parts of cedet will do what you want I think. Speedbar has the tree structure thing, and EDE handles projects etc.

Blackington answered 9/5, 2009 at 19:0 Comment(0)
O
7

I just now did a word search for "explore" in package-list-packages, and discovered project-explorer. Seems to fit exactly what I want today (I don't code hardly, but I'm getting a grip on the structure of my Jekyll site).

Keys include:

  • TAB for folding and unfolding directories
  • Open files with RET or f. With a C-u prefix, it will prompt nicely for which window, and even from there allow you to decide to use window or open up a new one to any side (I didn't find the prompt string in the package code, so it seems to leverage built in Emacs functionality nicely; indeed it looks like dired even).

It's available on Melpa and Marmalade. It is available on Github at sabof/project-explorer.

I include the site's image for convenience:

project-explorer screenshot

I don't use projectile or helm, but it has some integration.

Opalopalesce answered 2/11, 2014 at 23:53 Comment(0)
S
6

Here are my thoughts on several competing file explorer type packages. See the comments above each package below:

;; 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)

For me, ivy plus dired gets me 98% of the way. ivy, dired, and dired-subtree gets me 99% of the way. project-explorer, and to a lesser extent, nav, are just nice alternatives to ivy plus dired or ivy plus dired and dired-subtree. Hopefully this will save you some time.

Simons answered 6/10, 2019 at 22:47 Comment(0)
R
3

I've used treemacs and it works well, especially with projectile.

Rectifier answered 25/11, 2021 at 6:59 Comment(1)
Treemacs is so cool. It has superseded neotree, which used to be my favorite before Treemacs arrived.Ootid
S
1

I found dired-sidebar to be fast and awesome, but for some minor inconveniences (icon, few missing commands), will stay with Treemacs as my current sidebar.

I don't think I will need Projectile as Emacs 28.1 has greatly improved project.el.
The sidebar and in-built project should be enough.

Sexcentenary answered 20/4, 2023 at 20:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.