With VsCode Icons & Spacemacs Light
With All the Icons & Solarized Light
With Arrows & Seoul-256
With Text UI & Doom Peacock
I recommend using use-package.
(use-package dired-sidebar
:ensure t
:commands (dired-sidebar-toggle-sidebar))
git clone https://github.com/jojojames/dired-sidebar
cd dired-sidebar
pwd # [Put this in load path.]
git clone https://github.com/Fuco1/dired-hacks
cd dired-hacks
pwd # [Put this in load path.]
Add config to Emacs:
(add-to-list 'load-path "path from pwd")
(require 'dired-sidebar)
M-x dired-sidebar-toggle-sidebar
(use-package dired-sidebar
:bind (("C-x C-n" . dired-sidebar-toggle-sidebar))
:ensure t
:commands (dired-sidebar-toggle-sidebar)
:init
(add-hook 'dired-sidebar-mode-hook
(lambda ()
(unless (file-remote-p default-directory)
(auto-revert-mode))))
:config
(push 'toggle-window-split dired-sidebar-toggle-hidden-commands)
(push 'rotate-windows dired-sidebar-toggle-hidden-commands)
(setq dired-sidebar-subtree-line-prefix "__")
(setq dired-sidebar-theme 'vscode)
(setq dired-sidebar-use-term-integration t)
(setq dired-sidebar-use-custom-font t))
For configuration, I recommend looking at the defcustoms in dired-sidebar.el
.
Sidebar can also be toggled together with ibuffer-sidebar.
(defun sidebar-toggle ()
"Toggle both `dired-sidebar' and `ibuffer-sidebar'."
(interactive)
(dired-sidebar-toggle-sidebar)
(ibuffer-sidebar-toggle-sidebar))
As a result of using dired
as a base, many features and functionality already
exist in a polished state with standard keybindings an Emacs user will already
be familiar with. Because of this dired-sidebar
’s codebase can stay small and lean,
serving as the glue to several different packages.
Having used the alternatives listed below, in my opinion,
dired-sidebar
is the fastest of the bunch.
Trying to open and navigate in emacs/src/lisp (or another directory I’ve forgotten) led to writing my own sidebar as I was not satisfied with the speed of the other drawers.
Sidebar may be used in multiple frames with each frame having its own sidebar state.
Sidebar can be periodically set to refresh to reflect the currently selected file.
When Sidebar is initially opened, folders will be automatically expanded to point to the current file.
Close/expand folders and open files with left click.
Leverages dired
’s desktop-save-mode
support for persistence.
Integrated with projectile.
Sidebar opens up with projectile
’s root as sidebar’s root.
Sidebar will also automatically update its root when projectile changes root.
Integrated with dired-subtree.
Close and expand folders with dired-subtree.
Integrated with ace-window.
Select the window files are to be opened in.
dired-sidebar
will automatically update to reflect file changes as well as
after a few special commands.
Take a look at dired-sidebar-refresh-on-special-commands
and
dired-sidebar-special-refresh-commands
for more configuration.
Uses all-the-icons for icons.
Icons will be replaced with “+” and “-” to indicate folder nesting in terminals.
Keys are bound for evil.
Integrated with magit.
Toggling the sidebar in magit
sets sidebar’s root at magit
’s directory.
If point was on a file in magit
, point at the file upon opening dired-sidebar
.
dired-sidebar
will open sidebar and point at buffer’s file.
Only dired-subtree
is required. The other integrations are optional
and dynamically detected.
https://github.com/Alexander-Miller/treemacs
https://github.com/jaypei/emacs-neotree
https://github.com/sabof/project-explorer
cask
make compile
make lint
make test
Look at issues page! :)