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.
Projectile + NeoTree are my combination of choice.
Projectile just uses your version control system to track files and has an awesome jump to file in project function.
Also, check the notes for integrating the two together.
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.
The different parts of cedet will do what you want I think. Speedbar has the tree structure thing, and EDE handles projects etc.
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
orf
. With aC-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 likedired
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:
I don't use projectile
or helm
, but it has some integration.
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.
I've used treemacs and it works well, especially with projectile.
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.
© 2022 - 2024 — McMap. All rights reserved.
project-explorer
below, it seems you can completely expand, withC-u S-TAB
. – Opalopalesce