dired-subtree expanded

dired mode is one of my favourite features of Emacs. I use it so often, it's pretty much my go-to file browser. I use it both on my local machine, and on remote machines via TRAMP. One feature of dired is the ability to enter sub-directories in the same buffer by inserting the contents under the current directory. While this is useful, I often want something quicker to check the contents of a directory without either opening it in a new buffer, or inserting it below.

The workaround for this I use is by using the excellent dired-subtree package and the following use-package definition.

(use-package dired-subtree
  :ensure t
  :after dired
  :bind (:map dired-mode-map
              ("TAB" . dired-subtree-toggle)))

Now whenever I want to expand a directory, I move my cursor over it and press the Tab ↹ key. Pressing Tab ↹ again on the same entry will collapse it and hide the contents again.