Skip to content
Show dired as sidebar and will not create new buffers when changing directory
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information. Update screenshot Mar 20, 2019
dired-toggle.el Update email Jun 16, 2019
screenshot.png Update screenshot Mar 20, 2019


dired-toggle command could toggle to show dired buffer as a sidebar for current directory(similar to dired-sidebar, but more lightweight). The sidebar buffer also enabled a minor mode named dired-toggle-mode, and it only contains one buffer instance, change directories in it will not create news buffers.


(use-package dired-toggle
  :defer t
  :bind (("<f3>" . #'dired-toggle)
         :map dired-mode-map
         ("q" . #'dired-toggle-quit)
         ([remap dired-find-file] . #'dired-toggle-find-file)
         ([remap dired-up-directory] . #'dired-toggle-up-directory)
         ("C-c C-u" . #'dired-toggle-up-directory))
  (setq dired-toggle-window-size 32)
  (setq dired-toggle-window-side 'left)

  ;; Optional, enable =visual-line-mode= for our narrow dired buffer:
  (add-hook 'dired-toggle-mode-hook
            (lambda () (interactive)
              (visual-line-mode 1)
              (setq-local visual-line-fringe-indicators '(nil right-curly-arrow))
              (setq-local word-wrap nil))))



You could install it easily through melpa by typing M-x package-install dired-toggle

Screen shot


(Enabled all-the-icons-dired and dired-subtree in screenshot)


GNU General Public License, Version 3.0

You can’t perform that action at this time.